Compare commits

..

1346 Commits

Author SHA1 Message Date
Georges Dupéron
4ed74b5226 Fixes #1497 free-id-table-ref! with procedure failure argument stores the procedure, not its result 2016-10-28 04:50:08 +02:00
Georges Dupéron
432afc4561 raco pkg new: include v6.5 and v6.6 and v6.7 in .travis.yml 2016-10-26 21:02:15 -05:00
Matthew Flatt
cb6af9664c fix expand + compile + write + read + module->namespace
... + prefix-in + relative-path module. All of those ingredients
(or some similar alternatives) are necessary to trigger a slow
way of saving module context for interaction evaluation where
a module-path index shift was getting lost.
2016-10-26 17:09:30 -06:00
Gustavo Massaccesi
f159295e55 optimizer: add boolean? to the list of relevant predicates
Previously the relevant predicates where disjoint, and until this commit
the only predicate that recognizes #f was `not`. So it's necessary to fix
two reductions to allow other predicates that recognize #f, like `boolean?`.

Add a hidden `true-object?` primitive that recognizes only #t, that is also
useful to calculate unions and complements with `boolean?` and `not`.

Also, extend a special case for expressions like
    (or (symbol? x) (something))
where the optimizer is confused by the temporal variable that saves the
result of `(symbol? x)`, and the final expression is equivalent to
    (let ([temp (symbol? x)])
      (if temp #t (something)))
This extension detects that the temporal variable is a `boolean?` and
reduces the expression to
    (if (symbol? x) #t (something))
2016-10-25 16:49:13 -03:00
Alexis King
2030c0b0ae Add a missing for-label require to the file/glob docs 2016-10-25 10:22:41 -07:00
Robby Findler
1b834d010a fix wrong name in docs 2016-10-23 22:54:46 -05:00
Craig Allen
b826b176d2 mistake in passing get-timestamp rather than sys-type to write-central-directory
It's worth noting that this hasn't caused me an issue, I came across it as I wanted to see what sys-type actually did. I couldn't say what the affect of this change would be and don't have a use case for it, it just looks wrong!
2016-10-23 11:25:17 -06:00
Matthew Flatt
4ce947da74 update pkg FAQ on the package build service's catalog 2016-10-23 10:43:02 -06:00
Matthew Flatt
c4d7e8bf1b improve ubsan support
Provide `--enable-ubsan` to simplify `-fsanitize=undefined` builds,
where alignment and floating-point divide-by-zero need to be
disabled to get useful results.

Also, repair undefined behavior exposed by the test suite. Most of the
repairs are avoiding `memset(..., NULL, 0)` --- which is an unhelpful
requirement, IMO. The other two repairs are worthwhile but unlikely to
have caused trouble.
2016-10-22 21:35:02 -06:00
Georges Dupéron
153dc01ccd Some small fixes to the documentation
* Wrong contract for syntax-local-value in the documentation.
* Clarified signature in documentation for expand-import, expand-export and pre-expand-export
* Corrected typo in documentation for "for".
* Fixed error message for function which seems to have been renamed in the docs
* Fixed typo in a comment in the tests
* Fixed a typo in the documentation for set-subtract.
* Use double ellipses for the free-id-table-set*, free-id-table-set*!, bound-id-table-set* and bound-id-table-set*! operations
2016-10-19 20:52:45 -05:00
Matthew Flatt
ddf6985020 fix docs on PLT_COMPILED_FILE_CHECK
Merge to v6.7
2016-10-15 07:28:52 -06:00
Matthew Flatt
ff7f1ce9ff update "More" now that xrepl is on by default
Merge to v6.7
2016-10-15 07:28:43 -06:00
Matthew Flatt
8ccde1e5b3 update HISTORY.txt for v6.7
Merge to v6.7
2016-10-15 07:10:44 -06:00
Matthew Flatt
9011fe7d83 fix optimizer on bitwise-and
The optimizer assumed a fixnum result if either argument to
`bitwise-and` implies a fixnum result. That's not correct if the
fixnum agument is negative.

Thanks to Peter Samarin for a bug report.

Merge to v6.7
2016-10-13 11:39:39 -06:00
Matthew Flatt
a9f2765b4f another errno in a signal handler 2016-10-13 11:27:28 -06:00
Matthew Flatt
6e2978fe5c save errno in write barrier signal handler
In case a write barrier happens between the set and use
of `errno`, make sure the barrier doesn't cause the
`errno` value to change in the process of making other
system calls.
2016-10-13 11:27:28 -06:00
Matthew Butterick
9422d66601 improve vertical positioning & paren shaping in syntax->string 2016-10-12 16:02:32 -05:00
Vincent St-Amour
ecadde3a65 Add #:logger keyword argument to with-intercepted-logging.
Closes #1486.
2016-10-11 11:50:33 -05:00
Stephen Chang
58d9b3eb19 add doc example for make-provide-pre-transformer 2016-10-11 11:40:13 -04:00
Vincent St-Amour
241d87c011 Avoid tech collision.
Closes #1484.
2016-10-09 10:54:53 -05:00
Alexis King
e340719e5e Ignore git-http-backend stderr output in the pkg tests 2016-10-08 16:24:04 -07:00
Vincent St-Amour
d171218215 Post-release version for the v6.7 release 2016-10-07 14:52:26 -05:00
Vincent St-Amour
d597983bb9 Make pkg git credential format extensible.
Thanks to Eli.
2016-10-07 14:17:31 -05:00
Vincent St-Amour
456a72a36c Have id-table-ref! call its failure thunks.
Closes PR15346.
2016-10-07 13:58:47 -05:00
Matthew Flatt
a1a2d9c2c7 fix missing expansion context for prop:rename-transformer proc
When calling a procedure that is attached as a
`prop:rename-transformer` property value, make sure that
any available expansion context is accessible as reflected by
`(syntax-transforming?)`.

Syntax parameters as rename transformers particularly rely on that
information for local expansion.

Thanks to Jay for the "stxparam.rktl" test.

Closes #1479
2016-10-07 08:58:44 -06:00
Alexis King
d9750064b9 Merge pull request #1472 from lexi-lambda/pkg-git-credentials
Add support for git-backed packages that require authentication
2016-10-06 18:24:24 -07:00
Ben Greenman
65a69417cc doc: clarify elements vs values in sequence/c 2016-10-06 18:46:46 -04:00
Ben Greenman
97c65102b3 add file/glob
implements globbing for path strings
- glob : globs -> listof path
  in-glob : globs -> sequenceof path
  glob-match? : globs path-string -> boolean
- wildcards are: * ? [...]
- braces {} get expanded to multiple globs
- if pattern ends with /, only match directories
- wildcards don't capture dotfiles by default (keyword arg overrides)
2016-10-06 18:41:26 -04:00
Alexis King
c459886fc5 Add some warnings about checkout credentials being stored unencrypted 2016-10-06 11:48:48 -07:00
Alexis King
4111dbc967 Add test for raco pkg install for authenticated git packages 2016-10-06 10:42:36 -07:00
Ben Greenman
684dd2d1cb typo: redeclaration 2016-10-06 08:57:05 -04:00
Ben Greenman
1dd934c8cb Add H: and R: search box options, to search for #lang and #reader providers 2016-10-04 13:05:00 -04:00
Matthew Flatt
9887669ab0 fix single-argument write-byte and write-char
Repairs a mistake in 8e7792d8

Closes PR 15363
2016-10-04 10:09:48 -06:00
Alexis King
6d63e4443f Make raco pkg try git-checkout-credentials when cloning a repository 2016-09-29 14:21:07 -07:00
Ryan Culpepper
c08a2fd57c syntax/parse: add #:and and #:post side-clauses 2016-09-29 17:21:07 -04:00
Alexis King
afa17a3df6 Adjust net/git-checkout to raise exn:fail:git instead of exn:fail
This allows things like the package system to detect when something goes
wrong with the git transfer without catching everything else, too.
2016-09-29 13:59:52 -07:00
Alexis King
8de889df5e Add support for the 'git-checkout-credentials raco config option 2016-09-29 13:58:42 -07:00
Alexis King
d409fb5e2e Add #:username and #:password arguments to net/git-checkout
This can be used to provide authentication for accessing repositories
over HTTP(S), such as private repositories on GitHub.
2016-09-29 13:58:39 -07:00
Ryan Culpepper
6caec0249f syntax/parse: document ~post 2016-09-29 15:53:26 -04:00
Matthew Flatt
00644821de fix regexp-matching bug
In a pattern like

 a*b

a naive attempt to match will take quadratic time on an input that
contains all "a"s an no "b". To improve that case, the regexp compiler
detects that a match will require a "b" and checks the input for a "b"
to enable linear-time failure.

That optimization mishandled `(?!...)` and `(?<!...)` patterns,
treating the must-not-match subpatterns as things that must match.
So,

  (regexp-match "a*(?!b)" "aaaxy")

returned false, because the input doesn't contain "b".

Thie commit repairs the optimization.

Closes #1468
2016-09-24 14:46:28 -06:00
Tony Garnock-Jones
5ec147ee40 Add margin-note relating quote-source-file to __FILE__ and __file__. 2016-09-23 14:48:08 -04:00
Matthew Flatt
c19848f990 fix optimizer bug
Fix a regression relative to v6.4 caused by a refactoring of the
compiler between v6.4 and v6.5. The refactoring lost information about
letrecs that are converted internally to let* when a mutable variable
is involved, and it ends up allocating a closure before the box of a
mutable variable that is referenced by the closure. Something like
`with-continuation-mark` is needed around the closure's `lambda` to
prevent other optimizations from hiding the bug.

Closes #1462
2016-09-15 11:19:13 -06:00
Matthew Flatt
2174f4a029 fix optimizer bug
Closes #1461

Thanks to Gustavo for tracking down the problem.
2016-09-15 07:58:21 -06:00
Matthew Flatt
cfb2a7aa32 in-directory: sort entries
Make `in-directory` more like `directory-list` by sorting
directory content.
2016-09-15 06:11:30 -06:00
Jay McCarthy
903afe2240 Merge pull request #1460 from jbclements/add-xml-attribute-encode
add xml-attribute-encode function
2016-09-14 21:17:55 -04:00
John Clements
38622ce276 docs for xml-attribute-encode 2016-09-14 10:39:56 -07:00
John Clements
63d0f79847 add xml-attribute-encode function 2016-09-14 09:34:27 -07:00
Alex Knauth
62f5b2c4e4 syntax/srcloc: disarm and rearm when rebuilding syntax (#1448) 2016-09-12 18:08:57 -04:00
Ryan Culpepper
fd4ce5afe4 add more codes to lookup-errno, relax contract (#1433)
lookup-errno now returns #f when given an unknown symbol instead
of raising a contract error. It should not return #f for any
symbol that it previously accepted.
2016-09-12 18:07:44 -04:00
Alexis King
6e6056b9b8 Propagate srcloc information in wrap-expr/c from syntax/contract (#1418) 2016-09-12 18:06:57 -04:00
Robby Findler
a01cf359eb bring line lengths down below recommended widths 2016-09-08 21:45:50 -05:00
Matthew Flatt
ce6b9d5931 fix chaperone-of? on bytecode-unmashaled hash tables
Closes #1456
2016-09-08 20:23:07 -06:00
Asumu Takikawa
558fccce98 Add some examples for the JSON docs 2016-09-07 22:46:38 -07:00
Alex Knauth
1952bc4ede fix typo in the syntax-arm docs (#1447) 2016-09-07 14:27:35 -04:00
Sam Tobin-Hochstadt
94dbcb12dc Make sql-null? a struct predicate. (#1450)
This allows Typed Racket to know that it's pure and safe to use
as an opaque value.
2016-09-07 10:57:10 -04:00
Andrew Kent
42f4784735 add vector-sort to racket/vector (#1398)
* add vector interface to private/sort.rkt
2016-09-06 17:07:20 -04:00
AlexKnauth
95e8ade091 procedure-rename: don't convert procs into methods or methods into procs 2016-09-05 11:30:27 -05:00
Jay McCarthy
5b1658c6b4 Merge pull request #1446 from AlexKnauth/cdot-left-assoc
make cdot reader left associative
2016-09-01 20:40:56 -04:00
AlexKnauth
17db8e57f0 update read-cdot documentation 2016-09-01 16:28:06 -04:00
Matthew Flatt
cd44e78211 fix dynamic-require on certain forms of re-export from #%kernel
Closes #1445
2016-09-01 09:19:11 -06:00
AlexKnauth
f1906d572f add tests for read-cdot option 2016-09-01 09:17:55 -04:00
AlexKnauth
d648c8cc42 make read-cdot group datums from left-to-right
so that X.Y.Z is read as (#%dot (#%dot X Y) Z)
2016-09-01 09:17:29 -04:00
Ben Greenman
5708526055 add index for 'chmod' 2016-08-30 17:55:38 -04:00
Sam Tobin-Hochstadt
4cc1503d15 Increase timeout. 2016-08-30 17:09:55 -04:00
Stephen Chang
1ddb4d025c doc typo: nonnegative-exact -> exact-nonnegative 2016-08-30 13:34:22 -04:00
Matthew Flatt
6444d078eb fix validation of known structure mutators
Specifically, fix the case where the structure type for the mutator
includes "auto" fields (with no corresponding constructor argument).
2016-08-29 19:09:37 -06:00
Robby Findler
f878afb82b misc minor improvments to unconstrained-domain->
- add an optimization based on procedure-result-arity
 - make it generate less code
 - fix a few bugs
2016-08-29 12:36:50 -05:00
Robby Findler
56c97474b0 rename a variable to clarify its use 2016-08-29 12:36:49 -05:00
Jay McCarthy
34ad1cec3f Error rather than return weird #%dot 2016-08-29 11:12:15 -04:00
Jay McCarthy
c1242fa52a Fix handling of dots at end, maybe should be an error. Closes PR1439 2016-08-29 08:11:13 -04:00
Jay McCarthy
a5ecc5c92e Allow concurrent execution of these tests, thanks for the catch Sam 2016-08-29 07:56:41 -04:00
Stephen De Gabrielle
5ef5a4f3cf struct is preferred
changed 'make-struct' to struct
2016-08-25 10:37:06 -05:00
Vincent St-Amour
00f0311473 setup-plt -> raco setup
Survived unnoticed for 6+ years.
2016-08-24 15:33:07 -05:00
Robby Findler
6983adc31d fix box/c-as-expression
closes PR 15341
2016-08-24 14:30:44 -05:00
Andrew Kent
753d97335c add location info to the match error msg (#1430) 2016-08-24 13:51:23 -04:00
Robby Findler
2e5b4a6515 adjust tests for (->i () (values)) fix 2016-08-23 14:31:36 -05:00
Brian Lachance
07718022b4 Support an empty (values) range in ->i 2016-08-23 14:31:36 -05:00
Ryan Culpepper
471f37158a syntax/parse: allow pattern expanders to produce EH patterns
fixes #1427
2016-08-22 19:47:41 -04:00
Matthew Flatt
a5f0e6dcfc identifier-binding: add mode to report top-level binding info 2016-08-22 08:54:34 -06:00
Matthew Flatt
5f9576cb22 fix space-safety in compiler
The `if` case of the compiler's space-safety pass abused its "last
non-tail call relative to the closest enclosing binding" state as
"last non-tail call relative to the enclosing run time", which could
cause it to not clear a stack position as needed to maintain space
safety.
2016-08-22 06:50:15 -06:00
Gustavo Massaccesi
d4158c2b04 JIT: Allow the jitter to reverse the arguments of string=? 2016-08-19 20:05:37 -03:00
Sam Tobin-Hochstadt
6cad51189d Increase timeout for url-port test. 2016-08-19 10:30:39 -04:00
Robby Findler
0c03952ca7 fix test cases 2016-08-19 09:17:47 -05:00
Alex Knauth
42dcc525b1 add lang-reader-module-paths to factor out copy-pasted code (#1347)
* add lang-reader-module-paths to syntax/module-reader

to be used as the third argument to make-meta-reader in lang-extensions
like at-exp

* document lang-reader-module-paths

* use lang-reader-module-paths in at-exp
2016-08-19 07:42:59 -06:00
Leif Andersen
9df2c3292e Make relative directory argument for resolve-module-path-* have a def… (#1326)
* Make relative directory argument for resolve-module-path-* have a default to #f

The resolve-module-path-* functions effectively already had a default argument,
which is #f, this allows you to just directly call it with one argument.

* Add tests for resolve-module-path-* with optional argument
2016-08-19 07:15:11 -06:00
Sam Tobin-Hochstadt
eec3684dbd Add recompile option to raco demod. (#1373)
Originally by @bdj in racket/compiler#7.
2016-08-19 07:09:49 -06:00
Matthew Flatt
c3355f6df2 remove spaces around em dashes 2016-08-19 07:05:47 -06:00
Matthew Butterick
aef8f3e7bd clarify role of empty stop-ids list in local-expand (#1335) 2016-08-19 07:03:54 -06:00
Matthew Butterick
88292a6e13 add a more concise example of patching a phase mismatch (#1331)
* add a more concise example of patching a phase mismatch

* Update phases.scrbl

Clarifications
2016-08-19 07:03:43 -06:00
Matthew Butterick
787915155f add example of negative phase level (#1330)
* add example of negative phase level

* Update proc-macros.scrbl

Remove `eval:error`

* correct dashes
2016-08-19 07:03:19 -06:00
William J. Bowman
998bfba4c4 skip-installed from all scopes, not current (#1361)
closes issue #1115
2016-08-19 06:56:12 -06:00
gus-massa
70adb6a502 Fix typo in string-ci=? docs (#1424)
After case-folding the strings, they are compared with equal? instead of eqv?
2016-08-19 06:33:45 -06:00
Matthew Butterick
9f7a0af3e5 update #lang tutorial to use reader submodule (#1409) 2016-08-19 06:33:36 -06:00
Alexis King
0b21818100 Preserve syntax-original?-ness and syntax properties from splicing forms (#1413)
This makes two changes to the forms in racket/splicing to adjust how
syntax properties are propagated through expansion:

  1. Uses of make-syntax-introducer are passed #t as the first argument,
     which causes the introduced scope to be consider a use-site rather
     than macro-introduction scope. This prevents syntax objects from
     being unnecessarily marked as unoriginal, in the syntax-original?
     sense.

  2. Uses of syntax/loc have been adjusted to copy syntax properties
     from original syntax objects, which were previously discared. Forms
     that were spliced into the surrounding context, such as begin,
     define-values, and define-syntaxes, recreated the top-level syntax
     objects, which did not preserve syntax properties from the
     originals.

This is not a perfect solution, mostly because it potentially elides
properties that may be associated with captured literals (that is,
properties attached directly to begin, define-values, or define-syntaxes
identifiers themselves). However, it seems to accommodate most of the
common use-cases: propagation of syntax-original?-ness and forms like
`struct`, which attach properties like 'sub-range-binders.

fixes #1410
2016-08-19 06:33:20 -06:00
Robby Findler
8df0d6bba3 finish (-> void?) optimization 2016-08-18 13:16:15 -05:00
Robby Findler
bd2f889251 minor cleanups 2016-08-18 13:16:14 -05:00
Robby Findler
2c7db537cc add indexing for contract syntax properties 2016-08-18 13:16:14 -05:00
Jay McCarthy
de3faeeda4 Merge pull request #1411 from tim-brown/http-connect-proxy
https and git proxying via HTTP CONNECT
2016-08-18 11:16:48 -04:00
Tim Brown
c9f6f6aa31 Merge branch 'master' into tmp-http-connect-proxy-merge
Fixed conflict with Tony’s head? definition
2016-08-18 14:40:08 +01:00
Matthew Flatt
83196703ee compiler/zo-marshal: fix encoding mistakes
Changes to the optimizer and validator exposed old problems.
2016-08-17 18:05:17 -06:00
Matthew Flatt
36548ea289 JIT: recognize unsafe-struct-ref argument sequences
A `struct-copy` form can generates a call for a constructor that
includes a sequence of `unsafe-struct-ref` arguments. Each
`unsafe-struct-ref` must still check for a chaperone. Make the JIT
recognize that pattern an turn it into a single test instead of
one test per `unsafe-struct-ref`.
2016-08-17 18:05:17 -06:00
Alexis King
232c80e340 Record disappeared uses from syntax/parse/experimental/template (#1423) 2016-08-17 17:50:56 -04:00
Robby Findler
30f946fc4b add history, typos 2016-08-17 15:48:22 -05:00
AlexKnauth
1b1b400f91 add #:newline? argument to pretty-printing functions 2016-08-17 15:44:39 -05:00
AlexKnauth
1af7ec7088 reformat pretty.rkt a bit
#lang instead of module, spaces instead of tabs, other whitespace and
indentation
2016-08-17 15:44:38 -05:00
Benjamin Greenman
1478f64c14 doc: fix broken link to contract-generate
Replaced with `contract-random-generate`
2016-08-15 20:43:47 -04:00
Jay McCarthy
986ea517d1 Merge pull request #1415 from tonyg/fix_1414_fd_leak_HEAD
Explicitly close the http-conn on http-sendrecv with method HEAD.
2016-08-15 09:18:18 -04:00
Matthew Flatt
ab6f578eca another repair for older MSVC 2016-08-15 06:24:55 -06:00
Tim Brown
9da549ea87 PR1411 Jays observations re thread-server 2016-08-15 10:27:07 +01:00
Tony Garnock-Jones
72db2b7147 Explicitly close the http-conn on http-sendrecv with method HEAD. Fixes #1414. 2016-08-14 18:32:38 -04:00
Matthew Flatt
2c65aa8512 unbreak compile with MSVC 2016-08-14 07:33:27 -06:00
Matthew Flatt
84793e80ff doc corrections
Fix inacurracies noticed while reimplementing the module and macro system.
2016-08-13 14:15:54 -06:00
Matthew Flatt
71b4f5f6c0 doc corrections for syntax-make-delta-introducer 2016-08-13 14:15:54 -06:00
Matthew Flatt
c9da43378f restore SCHEME_INPORT_VAL and SCHEME_OUTPORT_VAL 2016-08-13 14:15:54 -06:00
Matthew Flatt
21d5d909a6 doc correction for ffi/unsafe/alloc 2016-08-13 14:15:54 -06:00
Matthew Flatt
db95651454 internal support for measuring allocation counts 2016-08-13 14:15:54 -06:00
Matthew Flatt
b0ecafb731 more GC stats on exit 2016-08-13 14:15:54 -06:00
Matthew Flatt
0034c31820 track cumulative allocation
Extend `current-memory-use` to accept a 'cumulative flag.
2016-08-13 14:15:54 -06:00
Jay McCarthy
a0a0e41908 Allow NULL ptr return so we can see error message 2016-08-11 19:31:15 -04:00
Tim Brown
29997da340 Merge branch 'master' into http-connect-proxy 2016-08-10 17:00:11 +01:00
Tim Brown
7fb52529f8 PR#1411 Tests
http-proxy/ contains a suite of almost useful (but mostly useless) servers.

These can be used to test http-client, and url.rkt

git proxy is not tested yet --  I really wouldn’t know how
2016-08-10 16:08:16 +01:00
Robby Findler
d22a771c98 avoid dropping provide/contract-original-contract property 2016-08-09 16:25:54 -05:00
Tim Brown
08c1865461 PR#1411 Implementation for jeapsotrophe's comments
See github commentary for rationale behind changes

Also documentation for `tcp-or-tunnel-connect`
2016-08-09 15:37:29 +01:00
Tim Brown
14e1d13fe6 PR#1411 documentation tippex 2016-08-09 14:30:50 +01:00
Tim Brown
a5583485b6 PR#1411 Documentation 2016-08-09 14:12:04 +01:00
Tim Brown
321000b831 https and git proxying via HTTP CONNECT
This patch adds https and git proxying through HTTP’s `CONNECT` method.

**Sanity Checks Needed:**
1. Is the git protocol proxying necessary?
   It might be overkill, and I haven’t overly tested it since `raco pkg
   install` uses https as its transport anyway
2. If anyone is better clued up on HTTP `CONNECT` best practice, then
   please check the headers that I pass (in `http-client.rkt`)
3. Is HTTP `CONNECT` the only/best way to proxy HTTPS? It is what *curl*
   uses (which might be a good indicator)
4. Will the ports be closed properly? (does anyone see a fid leak?)
  - how do I test for that? Open (and allegedly close) 1024 tunnels?
5. The `abandon-p` definitions in `http-conn-CONNECT-tunnel` could
   probably be reduced, but they’re defined as they are to allow me to
   put debugging hooks in
6. No tests or documentation yet
7. I edited this with *vim*, and therefore the indentation is a la vim.
   I looked at doing a global reindent (of git-checkout) and so much
   changed that I abandoned that as an idea. It indentation is too
   “off-style” then feel free to change it :-)

**git-checkout.rkt:**
- `initial-connect` now tries to use a git proxy (see `url.rkt`, below)
  when *transport*=`git`
- (if *transport*=`https`, then `url.rkt`’s standard proxying will be
  used)

**http-client.rkt:**
- `http-conn-open!` can now be passed a
  `(list/c base-ssl?/c input-port? output-port? (-> port? void?))` to
  describe:
  - maybe a negotiated ssl context
  - two tunnel (or other arbitrary) ports to use instead of newly
    `...-connect`ed ports
  - an abandon function for those ports
- `http-conn-send!` has a function `print-to` which curries
  `(fprintf to)`, but allows a hook for an `eprintf` for debugging
- **added `http-conn-CONNECT-tunnel`:** this opens an new `http-conn`
  and arranges for CONNECT tunneling to `target-host` and `target-port`
- factored contracts into `base-ssl?/c` and `base-ssl?-tnl/c`
- added contract for `http-conn-CONNECT-tunnel`

**url.rkt:**
- `proxiable-url-schemes`: now includes `https` and `git`
- `env->c-p-s-entries`: the environment variable “parser” now takes a
  rest-list of lists of environment variables, and the scheme that these
  variables proxy is garnered from the variables’ names. As before
  there are:
  - `plt_http_proxy` and `http_proxy`
  - `plt_https_proxy` and `https_proxy`
  - `plt_git_proxy` and `git_proxy`
  during the previous iteration of obtaining the proxy variables at
  startup, we discussed the appropriate naming conventions for these
  variables. This doesn’t seem to deviate from that
- `env->c-p-s-entries`: having a proxy url that isn’t strictly:
  `http://hostname:portno` (e.g.  having a training slash) generates a
  log warning, not an error. It was beginning to bug me
- `proxy-servers-guard`: accepts any one of the `proxiable-url-schemes`
  (not just `http`)
- no proxy is agnostic to the URL scheme
- `proxy-tunneled?`: returns false for `http`, which is proxied using an
  HTTP proxy. Returns true for other URL schemes -- which go through a
  tunnel
- **`make-ports`:** tests whether a tunnel proxy is necessary. If so, it
  creates a tunnel and plumbs the connections
- elsewhere, anywhere that tests for proxy, now tests for
  `(and proxy (not proxy-tunneled? url))`, because tunneled HTTPS
  connections are direct (once they’re through the tunnel, IYSWIM)
2016-08-09 12:50:17 +01:00
Matthew Flatt
bf53f02bb1 fix problem with the mandatory-keywords change
Repairs a problem with 7bcc9afd4c as exposed by the contract test
suite.
2016-08-08 07:45:35 -06:00
Matthew Flatt
ad230d2ca0 improve structure-type property handling
Make the optimizer recognize and track `make-struct-property-type`
values, and use that information to recognize `make-struct-type`
calls that will defnitely succeed because a property that hs no
guard is given a value in the list of properties.

Combined with the change to require-keyword expansion, this
change allows the optimizer to inline `f` in

 (define (g y)
   (f #:x y))

 (define (f #:x x)
   (list x))

because the `make-struct-type` that appears between `g` and `f`
is determined to have no side-effect that would prevent `f` from
having its expected value.
2016-08-07 15:59:02 -06:00
Matthew Flatt
7bcc9afd4c adjust required-keyword expansion to improve optimization
Make the definition of a function with a required keyword expand in a
way that allows the optimizer to recognize it as a form that has no
errors or externally visible side effects.

The old expansion of

 (define (f #:x x) ...)

included

 (define lifted-constructor (make-required ....))
 (define f (lifted-constructor (lambda ....) ....))

where `make-required` calls `make-struct-type` and returns just the
constructor.

The new expansion instead has

 (define-values (_ lifted-constructor _ _ _)
   (make-struct-type ....))
 (define f (lifted-constructor (lambda ....) ....))

In other words, `make-required` is inlined by macro expansion,
so that the optimizer will be able to see it and eventually
conclude that no side effects have taken place.
2016-08-07 14:25:27 -06:00
Matthew Flatt
62b8f7aaa3 fix syntax-local-lift-values-expression
When lifts are captured as `let`, make sure the variable
bindings aren't reversed.
2016-08-07 14:22:35 -06:00
Matthew Flatt
a229640251 Update "foreign.rktc" for --enable-ffipoll
This is an adjustment for 96d212d376, since "foreign.rktc" is the
source for "foreign.c".
2016-08-04 20:53:45 -06:00
Matthew Flatt
3769d82b74 fix allocation
Repairs a mistake in 95f6a2342b.
2016-08-04 20:18:34 -06:00
Matthew Flatt
b1e406b5a7 fix redundant-require checking
When a module defines and exports an identifier at two phases,
and when another module imports both of them at the same phase,
an error was not reported as it should have been.
2016-08-04 20:18:34 -06:00
Jay McCarthy
96d212d376 Adding FFI polling mode
With this option, FFI calls always block until scheme_check_foreign_work
is called by the program embedding Racket.

This is needed for embedding Racket into contexts where you do not
control the event loop, need Racket to make FFI calls, and those FFI
calls must occur on a thread within the event loop. A good example of
this is with OpenGL FFI calls that require the current thread to hold
the OpenGL/EGL context.

An important point about this is that scheme_check_foreign_work will
only execute a single FFI call. So if this is used for OpenGL rendering,
you'll want to run it a lot.
2016-08-04 13:47:08 -04:00
Vincent St-Amour
4716a6eb00 Fix set-symmetric-difference when passed the same set multiple times.
Closes #1403.
2016-08-03 13:02:14 -05:00
Rohin Shah
b3b16b36a1 Fix bug in #:defined-table implementation, add test for #:defined-table 2016-08-01 15:23:31 -05:00
Leif Andersen
dc13793c24 sandwitch -> sandwich
(Apparently the other way was incorrectly in my dictionary.)
2016-08-01 12:41:56 -04:00
Ryan Culpepper
31fdac8773 syntax/parse: use pattern for default min repc error
see #1393

Also fix first-desc:* to only use constant descriptions.
2016-08-01 10:47:39 -04:00
Ryan Culpepper
9bf30e0977 syntax/parse: nullability analysis improvement
An S-pattern used as an H-pattern is not nullable.
2016-08-01 10:47:39 -04:00
Ryan Culpepper
2e96b60120 syntax/parse: fix internal debugging code (delete iattrs field) 2016-08-01 10:47:39 -04:00
Ryan Culpepper
f968b87385 syntax/parse: remove unused field from pat:pair, pk/pair 2016-08-01 10:47:38 -04:00
Ryan Culpepper
d6a3a22989 syntax/parse: propagate description-if-constant to annotated pvars
fixes #1392
2016-08-01 10:47:38 -04:00
Ryan Culpepper
71fbe4ad7d syntax/parse: remove unused field from rhs struct 2016-08-01 10:47:38 -04:00
Ryan Culpepper
22b5d6b2da syntax/parse: add description-if-constant field to stxclass
Also remove (inline) options, integrate structs and improve comments.
2016-08-01 10:47:38 -04:00
Ryan Culpepper
1f94c4ed3a syntax/parse: fix test for drdr; suppress logging output 2016-08-01 10:47:38 -04:00
Ryan Culpepper
3a7bf955c0 remove useless requires 2016-08-01 10:47:38 -04:00
Ryan Culpepper
ce1bf2503d syntax/parse: combine away pattern-expander*.rkt modules 2016-08-01 10:47:38 -04:00
Ryan Culpepper
6fe55ec307 syntax/parse: trim txlifts helper module 2016-08-01 10:47:38 -04:00
Ryan Culpepper
0a7d97df86 syntax/parse: fix dependencies, add deps test
Removes residual dep on racket/contract (again!)
Removes use of racket/struct (which depends on contract)
List other residual dependencies in sc.rkt
2016-08-01 10:47:38 -04:00
Leif Andersen
cb1a1e233e Cannot show system build paths in docs 2016-08-01 09:34:12 -04:00
Leif Andersen
1b050905e9 Add example for collection-file-path 2016-07-31 23:19:49 -04:00
Gustavo Massaccesi
bfa269982f optimizer: don't move APPN_FLAG_OMITTABLE inside lambdas
Some expressions are omittable only when the arguments have certain types.
In this case the application is marked with APPN_FLAG_OMITTABLE instead of relaying on the flags of the primitive.

The optimizer can't use this flag to move the expression inside a lamba or across a potential continuation capture, unlike other omittable expressions. They can be moved
only in more restricted conditions.

For example, in this program

  #lang racket/base

  (define n 10000)
  (define m 10000)
  (time
   (define xs (build-list n (lambda (x) 0)))
   (length xs)
   (define ws (list->vector xs)) ; <-- omittable
   (for ([i (in-range m)])
     (vector-ref ws 0)))     ; <-- ws is used once

If the optimizer moves the expression in the definition of ws inside the recursive
lambda that is created by the for, then the code is equivalent to:

  #lang racket/base

  (define n 10000)
  (define m 10000)
  (time
   (define xs (build-list n (lambda (x) 0)))
   (length xs)
   (for ([i (in-range m)])
     (vector-ref (list->vector xs) 0)))     ; <-- moved here

And the new code is O(n*m) instead of O(n+m). This example is a minimized version
of the function kde from the plot package, where n=m and the bug changed the run
time from linear to quadratic.
2016-07-31 08:58:54 -03:00
Gustavo Massaccesi
004fd02501 optimizer: don't mark (-) as omittable
The application of some procedures are omittables when the arguments have
certain properties. Check the arity of the procedure before marking the application as omittable.
The only case that appears to be relevant is the expression (-).
2016-07-31 08:54:54 -03:00
Gustavo Massaccesi
8bb79deaa2 extend reductions for eq? to expressions with eqv? and equal?
The relevant predicates are almost disjoint. The superposition
is solved with predicate_implies and predicate_implies_not.

This is also valid considering the equivalence classes modulo
eqv? and equal?. So if the optimizer knows that two expressions
X and Y have different relevant types, then it can reduce
(equal? X Y) ==> (begin X Y #f).
2016-07-31 08:50:43 -03:00
Leif Andersen
99b35a5d08 gracket should use gui-interactive.rkt
Previously it used interactive.rkt, which is problematic when the user
wants to have a different file for interactive.rkt and gui-interactive.rkt
2016-07-30 13:45:11 -04:00
Ben Greenman
22546a3f22 typo: description of module-compiled-name argument 2016-07-30 02:14:01 -04:00
Leif Andersen
4c61013ef2 Default repl should remain using ">" for prompt
Although xrepl uses ->, the default prompt should be `>`, to
maintain compatability with old shell scripts.
2016-07-29 23:17:26 -04:00
Ryan Culpepper
b7bd836f0f document this-syntax and #:auto-nested-attributes
fixes #1185, #1350
2016-07-29 17:39:33 -04:00
Stephen Chang
c56efb22a6 remove mention of syntax-id-rules in Macros section of Guide 2016-07-29 16:19:43 -04:00
Alexis King
169472487e Wrap various syntax/parse forms in with-disappeared-uses (#1397)
fixes #1396
2016-07-29 13:11:49 -04:00
Ben Greenman
ba8b848f94 Accept path-string in syntax/modcode
Changes signatures in `syntax/modcode` to accept `path-string?` arguments
 instead of `path?`.
Before, the docs listed `path-string?` but the contracts used `path?`.
Now they agree.
2016-07-29 12:26:10 -04:00
Matthew Flatt
6e4a4f4949 validator: thread structure-type info all the way through
The optimizer now makes more choices based on imported structure-type
info that thet validator needs to reconstruct, so pass that
information all the way through.
2016-07-29 09:45:11 -06:00
Marc Burns
ef41bf21cb fix wrong pluralization 2016-07-28 15:33:13 -05:00
Marc Burns
cdf9da7da4 an string -> an immutable string 2016-07-28 15:33:13 -05:00
Alexis King
1b63703ac0 Fix for-label requires for some struct documentation 2016-07-28 15:33:13 -05:00
Matthew Flatt
e3ae0103af fix a backward test on use-compiled-file-check
The backward test causes docs to be rebuilt too much.
2016-07-28 09:19:11 -06:00
Matthew Flatt
3f4e7d90cb improve compiler recognition of stuct constrcutors
Allow a `struct` form to be recognized when it provides
a number as the 8th argument to `make-struct-type`. In
particular, that change allows the construction of
optional-keyword functions to be recognized as a
purely functional operation.

Also, allow the optimizer to use information about imports
when deciding whether a module-level form is functional.
It's ok to use that information, because the validator has
it, too.

This combination of changes allows something like

 (define (f #:optional [x #f])
   (later))

 (define (later) ....)

to compile to a reference to `later` wihout a check.
2016-07-28 08:23:51 -06:00
Matthew Flatt
0d0cf535de compiler: fix copy propagation in letrec-check pass
Fixing dead-code cleanup in the letrec-check pass exposed
a bug in a part of the letrec check interpretation that is
analogous to copy propagation. The copy's representation
now refers to the original variable, instead of copying
the current set of deferrals (which is wrong if the original
is a `letrec`-bound variable that hasn't yet accumulated
its closures).
2016-07-28 08:23:50 -06:00
Matthew Flatt
cc9889d7ab fix setup for the letrec-check pass
Due to an obvious problem in the setup, the letrec-check pass wasn't
running an intended dead-code pruning pass. Correcting the problem
cuases one test in "optimize.rktl" to change, because the letrec-check
pass can see more in one case than thanother.

(Problem discovered by accidentally fixing the setup in a Racket
branch based on "linklets".)
2016-07-28 08:22:10 -06:00
Matthew Flatt
0198847980 wrap scheme/interactive load with error boilerplate 2016-07-26 10:55:43 -06:00
Matthew Flatt
453684b694 don't use isspace() on a signed character 2016-07-26 10:53:05 -06:00
Matthew Flatt
b9a9fdaa3f check for "config.rktd" before trying to read it for interactive 2016-07-26 10:47:19 -06:00
Matthew Flatt
fc345ed249 add use-compiled-file-check
Along with the `PLT_COMPILED_FILE_CHECK` environment variable, allows
the timestamp check to be disabled when deciding whether to use a
compiled bytecode file.

In accomodating this change, `raco make` and `raco setup` in all modes
check whether the SHA1 hash of a module source matches the one
recorded in its ".dep" file, even if the timestamp on the bytecode
file is newer. (If the compile-file check mode is 'exists, the
timestamp is completely ignored.)
2016-07-26 10:27:08 -06:00
Leif Andersen
c65ad1efad Moved racket/gui/init and racket/gui/interactive to the gui-lib 2016-07-26 10:14:38 -04:00
Leif Andersen
28f693a976 A few more changes based on Matthew's feedback.
Updated docs
2016-07-26 10:14:38 -04:00
Leif Andersen
e0e2708f4e Attempt to youse scheme_make_integer in dynamic_require 2016-07-26 10:14:38 -04:00
Leif Andersen
a6b7af9733 Made changes based on Matthew's comments.
1. Changed the API documentation for scheme_make_hash_tree, adding primitives for:

* SCHEME_hashtr_eq
* SCHEME_hashtr_equal
* SCHEME_hashtr_eqv

2. Changed direct uses of scheme_make_hash_tree to use these enumed values.

3. Fixed bugs in documentation

4. Defaults to racket/interactive (and racket/gui/interactive) if there is nothing in the config file
2016-07-26 10:14:38 -04:00
Leif Andersen
d0f9e4ba81 gr_config_init macro should not exist any more 2016-07-26 10:14:38 -04:00
Leif Andersen
237418ba0c Added documentation for the racket/interactive module 2016-07-26 10:14:38 -04:00
Leif Andersen
933a494fe0 Fix a few typos in the existing docs. 2016-07-26 10:14:38 -04:00
Leif Andersen
e5ff658875 Add docs for hash trees. 2016-07-26 10:14:38 -04:00
Leif Andersen
8588c43709 Oops, file checking should be on filename. 2016-07-26 10:14:38 -04:00
Leif Andersen
b0f266fad1 Moved xrepl to be part of bootloader directly. 2016-07-26 10:14:38 -04:00
Leif Andersen
314485edfb Start up xrepl when repl is loaded. 2016-07-26 10:14:38 -04:00
Leif Andersen
bd1ceb21d6 Add racketrc file to the etc/ folder. 2016-07-26 10:14:38 -04:00
Matthew Butterick
b62d0c80e4 Update examples for equal? eqv? eq? (#1391)
Use the same examples for each so it's easier to compare how the behavior differs.
2016-07-26 01:21:45 -05:00
Tony Garnock-Jones
1ba42bb70d Skip whitespace more liberally when parsing PLTSTDERR and friends.
Now accepts any whitespace, not just spaces, ignores both leading and
trailing whitespace, and accepts multiple whitespace characters
separating subterms.
2016-07-25 19:17:35 -04:00
Stephen Chang
99dd403ef6 fix another renaming provide src loc 2016-07-21 16:53:00 -04:00
Matthew Flatt
64a1209bb5 remove the other(!) debugging printf 2016-07-20 22:41:00 +02:00
Leif Andersen
f6c9f058e4 Add documentation for syntax/parse/lib/function-header 2016-07-20 14:00:10 -04:00
Matthew Flatt
8f4250ca45 remove debugging printf
Consider merge to v6.6 with 7318b1fd34
2016-07-20 11:32:57 +02:00
Matthew Flatt
7318b1fd34 fix equal? for futures
Closes PR 15331

Consider merge to v6.6
2016-07-20 09:28:18 +02:00
Matthew Flatt
e2dd92c9c1 add v6.6 to Racket "HISTORY.txt"
Merge to v6.6
2016-07-20 09:28:18 +02:00
Leif Andersen
02fa5e06b2 Update docs for racket/init 2016-07-19 17:52:43 -04:00
Leif Andersen
6c0dfa7053 Trying to use xrepl no longer swallos all errors. 2016-07-19 16:36:04 -04:00
Leif Andersen
b1adf65fd0 Make xrepl the default repl if it is installed 2016-07-19 16:36:04 -04:00
Stephen Chang
046f3eef37 fix src loc for renaming provide 2016-07-19 15:53:13 -04:00
Jonathan Schuster
562f5f01f6 Fix bugs in type errors for data/queue 2016-07-19 13:51:38 -05:00
William J. Bowman
5a9241076e Fixed location of traced procedures. Closes #1300 2016-07-19 12:24:26 -05:00
William J. Bowman
7d9b84b421 Tests for correct syntax location 2016-07-19 12:24:26 -05:00
Gustavo Massaccesi
e5e781c4ec optimizer: add more type annotations for procedures related with list?
After refactoring the test for the inferred types of some procedures that
use vector?/bytes?/string?/list? it was easier to spot the missing information.

Note that in the documentation, some arguments like the position in
  (vector-ref <vector> <position>)
are documented as exact-nonnegative-integer? but due to the implementation
details they are actually in a subset of fixnum?s.
2016-07-17 14:04:24 -03:00
Matthew Flatt
ca6c67be68 fix unsafe-immutable-hash-... on hash table from read
When `read` parses a literal hash table, it inserts an placeholder
just in case it's needed for cycles. The `unsafe-immutable-hash-...`
operations in some cases did not detect and remove the placeholder.

Closes #1376

Merge to v6.6
2016-07-15 06:23:20 -06:00
Asumu Takikawa
ad2c229af1 Add doc examples for FFI union types 2016-07-14 17:30:58 -04:00
Matthew Flatt
d1c2daf15b make variable-reference->namespace enable top-level mode
The namespace returned by `variable-reference->namespace` (or
`namespace-anchor->namespace`) may be used via `eval` to define new
bindings, so enable top-level binding support for the namespace.
2016-07-14 15:10:05 -06:00
Ryan Culpepper
19707a54be syntax/parse: change test to use eval so no error logged when compiled 2016-07-14 14:32:39 -04:00
Matthew Flatt
521ff7cc67 fix broken GC-traversal registration
Bug was part of 95f6a2342b
2016-07-14 06:58:59 -06:00
Matthew Flatt
689452e1c9 update "base" version 2016-07-13 13:53:07 -06:00
Matthew Flatt
9c94e5a8df optimizer: propagate info for super struct from requires
Allows a struct declaration to be recognized when it inherits
from an imported struct.
2016-07-13 13:53:07 -06:00
Matthew Flatt
95f6a2342b optimizer: connect struct predicates and accessors
for example, make the optimizer convert something like

 (struct a (x))
 (lambda (v) (if (a? v) (a-x v) #f))

to

 (struct a (x))
 (lambda (v) (if (a? v) (unsafe-struct-ref v 0) #f))
2016-07-13 13:53:07 -06:00
Matthew Flatt
591fcb6228 optimizer: recognize more struct declarations
The optimizer change in e887fa56d1 recognized struct declarations that
involved only whitelisted properties to guarantee that constructor
properties are preserved --- while `prop:chaperone-unsafe-undefined`
can affect the constructor, and other properties might imply that one.
But the optimizer's transformer aren't actually invalidated by
`prop:chaperone-unsafe-undefined`; the JIT's assumptions are affected,
but that's handled in a different way. So, remove the whitelist and
allow any property list.
2016-07-13 13:53:07 -06:00
Sam Tobin-Hochstadt
bd28c4459d Don't compile file that prints to stderr. 2016-07-13 10:39:11 -04:00
Sam Tobin-Hochstadt
f2eba4cd09 Add info to README. 2016-07-13 10:38:54 -04:00
Benjamin Greenman
3afa58e8d1 edit: make object/c-helpers private (#1374)
Fixes the TR "undocumented public identifiers" DrDr error
2016-07-12 16:16:42 -04:00
Matthew Flatt
e76df3bb00 adjust otimizer to keep the validator in sync
Sacrifice a tiny bit of information in the optimizer as of dce42313ad
to avoid confusing the valdiator.

See also discussion for #1365
2016-07-11 18:36:20 -06:00
Matthew Flatt
671adc0de2 tweaks to hashing
Faster hasing of booleans, correct potential loss of distinction
for a compound structure that ends in a symbol or keyword, and
shortcuiting lookup in an empty immutable hash table.
2016-07-11 15:42:50 -06:00
Ryan Culpepper
52bfb32cd3 syntax/parse: only check for empty match on unbounded EH patterns
This change permits EH patterns like (~once <nullable>), because the
match will happen at most once, so there is no danger of divergence.
Thanks to Alex Knauth for pointing out this special case.

Merge to release branch.
2016-07-11 13:04:07 -04:00
Benjamin Greenman
956d10432b typo: argument to 'module-compiled-submodules' (#1370)
Changed from `pre-module?` to `non-star?`
2016-07-10 18:46:24 -04:00
Gustavo Massaccesi
397d604182 optimizer: add types for something->immutable-something 2016-07-09 02:16:54 -03:00
Gustavo Massaccesi
f8b3ba8253 optimizer: reduce ignored ifs
The optimizer tries to reduce the `if` assuming that the result will be used.
In case it later detects that the result will be ignored, it can try to
apply some additional reductions to the branches and to the whole expression.
2016-07-09 02:16:40 -03:00
Jay McCarthy
9a5aa89fb5 Switch from deprecated Posix function removed in Android's LB64 ABI 2016-07-08 20:54:09 -04:00
Gustavo Massaccesi
dce42313ad optimizer: add string? to list of relevant predicates
Also add the type information for a few related functions like
string-append and bytes-append.
2016-07-08 21:07:22 -03:00
Robby Findler
9cf9897b16 raise a syntax error uses of keywords in case-> 2016-07-08 15:36:44 -05:00
Robby Findler
fdc3b4a685 improve docs for and/c
please merge to the release branch
2016-07-08 15:35:58 -05:00
Sam Tobin-Hochstadt
8d698389e7 Add a way to recognize cpointer predicates. (#1368)
Similar to `struct-predicate-procedure?`. Allows Typed Racket
(and the contract system generally) to avoid chaperone wrapping
for cpointer predicates.
2016-07-08 12:40:03 -04:00
Ben Greenman
4650a12350 export object/c-stronger helper functions
So that Typed Racket can use them to implement object/c-opaque
2016-07-08 12:06:29 -04:00
Matthew Flatt
b0c55b7394 OpenSSL v1.1 support
The SSL_library_init() function has been removed. (There's a new
SSL_init_ssl() function, but calling it is optional.) The
SSL_load_error_strings() function is similarly gone.

The SSLv23_client_method() and SSLv23_server_method() functions
are also gone. The new TLS_client_method() and TLS_server_method()
functions are better names for what SSLv23_client_method() and
SSLv23_server_method() evolved to do.

Finally, the dance for server-triggered renogotiation needs to
change, since the old dance involved manipulating the structure
directly.

Merge to v6.6
2016-07-08 09:28:49 -06:00
Matthew Flatt
42be8aadff fix collision handling for eq?-based immutable hash with #ts
When creating a collision node, make sure the "has a value" bit
is set, since the "has a hash code" bit should imply it.

This bug was made easier to trigger by 3fbb384604, but it was
potentially a problem for scope sets before.

Closes #1366

Merge to v6.6
2016-07-08 07:29:14 -06:00
Matthew Flatt
fd85bcaf21 fix printing of eq[v]?-based hash tables
Merge to v6.6
2016-07-08 07:29:07 -06:00
Vincent St-Amour
e10c57623c Post-release version for the v6.6 release 2016-07-07 15:39:47 -05:00
Sam Tobin-Hochstadt
bacb08acf5 raco decompile: Suggest raco make when the file isn't compiled. 2016-07-06 17:47:47 -04:00
Sam Tobin-Hochstadt
8377fa842f Improve compilation of hash table patterns with literal keys. 2016-07-04 18:39:43 -04:00
Robby Findler
bdd11100bb add explanation for and/c 2016-07-04 08:08:51 -05:00
Matthew Flatt
c5868e9ab1 fix JIT-inlined immutable? for chaperones 2016-07-01 19:18:35 -06:00
Matthew Flatt
1f00509705 JIT-inline immutable? 2016-07-01 13:30:50 -06:00
Matthew Flatt
8dec2485d6 adjust docs for read-language 2016-07-01 13:30:50 -06:00
Matthew Flatt
e92b07728f repair for define-cpointer-type 2016-07-01 13:30:50 -06:00
Sam Tobin-Hochstadt
762994654c Add note about obsolete list of MIME types.
Originally by @jbclements in https://github.com/racket/net/pull/9/
2016-07-01 10:58:35 -04:00
Matthew Flatt
f16f54a1b1 fix mismatch in future primitives when futures are disabled
Closes #1356
2016-07-01 08:50:15 -06:00
Matthew Flatt
0f12c8e0dc fix compiler warning for the no-threads build 2016-07-01 08:50:15 -06:00
Leif Andersen
ebe3a77c2b Update namespace-attach-module docs 2016-06-30 14:20:27 -04:00
Matthew Flatt
3fbb384604 add hash-keys-subset?
This function exposes the fast subset operation that is built in for
immutable hash tables (and used by the set-of-scopes implementation).

Also, make the space optimization implicit for `eq?`-based hash tables
that contain only #t values (instead of explicit and only available
internally). It turns out to be easy and efficient to make the
representation automatic, because the HAMT implementation can support
a mixture of nodes with some containing explicit values and some
containing implicit #t values.
2016-06-30 08:22:18 -06:00
Matthew Flatt
8ae013cdb1 unbreak --enable-sgcdebug 2016-06-30 07:47:54 -06:00
Matthew Flatt
2662850ca1 restore lost Tsint8 2016-06-30 07:47:54 -06:00
Alexis King
e86fa9f055 Improve with-disappeared-uses and add record-disappeared-use
Now with-disappeared-uses surrounds its body with let, so it can contain
multiple body expressions. The record-disappeared-use function is like
record-disappeared-uses but for a single identifier.
2016-06-29 12:50:14 -05:00
Alexis King
517c3cfef9 Track disappeared uses of match expanders within match forms (#1349) 2016-06-27 14:13:12 -04:00
Matthew Flatt
b9445023c1 simpler #%linklet bootstrap hook 2016-06-26 07:23:36 -06:00
Spencer Florence
431110531b fixed typo in url 2016-06-25 09:31:31 -05:00
Matthew Flatt
4a1afa66c8 add partial #%linklet primitive module
The `#%linklet` module is intended to eventually provide
a simplified compiler for the core Racket language. For
now, it provides minimal hooks for bootstrapping an
expander implementation.
2016-06-22 14:19:24 -06:00
Matthew Flatt
22d397cfe1 print a little more in a test suite 2016-06-22 14:18:54 -06:00
Gustavo Massaccesi
9978696991 Fix confusing indentation 2016-06-22 09:25:55 -03:00
Ben Greenman
edcb1e5479 typo: unxpected 2016-06-21 04:17:32 -04:00
Matthew Flatt
871392f09a add inspector-superior? 2016-06-17 10:23:47 -06:00
Bernardo Sulzbach
b0978652b3 Should call vector vec, not lst 2016-06-15 21:21:14 -05:00
Matthew Flatt
e887fa56d1 optimizer: allow some properties in recognized struct declarations
When the properties argument for `make-struct-type` is non-empty,
then we cant; guarantee that `make-struct-type` succeeds, but
if it does, then we can still know that the result is a structure
type and (as long as `prop:chaperone-unsafe-undefined` is not
involved) the properties don't affect the constructor, predicate,
selector, or mutators.
2016-06-15 17:38:34 -07:00
Matthew Flatt
ed3e5d3e7d different eq? hash code for symbol, unreadable symbol, and key
The `eq?` hash code of a symbol, unreadable symbol, or keyword depends
only on the character content, but all in exactly the same way, so
that the same string would produce the same hash code for all. That's
not a big deal for hashing, but it doesn't seem like a good idea, and
it can be confusing.
2016-06-15 17:15:11 -07:00
Ryan Culpepper
2eb806d20c syntax/parse: fix progress ordering 2016-06-15 18:12:56 -04:00
Asumu Takikawa
51bd8f3de5 Fix typo for in-combinations contract 2016-06-15 15:08:48 -04:00
Sam Tobin-Hochstadt
547ddaa6f5 Clarify contract comparison for characters. 2016-06-13 10:27:45 -04:00
Matthew Flatt
6454f85397 fix test
I accidentally left the test with a reference to my filesystem state.
2016-06-11 07:40:35 -06:00
Matthew Flatt
c71f33f9f8 fix mcons handling by built-in printer in expression mode 2016-06-11 06:53:31 -06:00
Matthew Flatt
b6e252c1e3 fix phase shifting in dynamic-require
Closes #1339
2016-06-11 06:34:52 -06:00
Matthew Flatt
8d5f196f96 clairfy 'add default of make-syntax-delta-introducer result 2016-06-10 04:34:52 -06:00
Matthew Flatt
cc717f1183 raco make -j: avoid changing the current directory
Make `raco make -j` consistent with `raco make` --- while `raco setup`
continues to set the current directory during compilation.
2016-06-10 04:34:52 -06:00
Matthew Flatt
9ca0513875 examples and docs for new define-serializable-cstruct version 2016-06-10 04:34:52 -06:00
Matthew Flatt
b1be0a452e more clean-up of references to pre-defined modules 2016-06-10 04:34:52 -06:00
Ben Greenman
c21d5e780b typo: with-immed-mark-val -> with-immed-mark-def-val 2016-06-08 18:34:36 -04:00
Asumu Takikawa
5e2caa169e Fix Guide link to scmindent 2016-06-08 17:11:15 -04:00
Vincent St-Amour
5489fb937e Move helper to a common file.
To avoid ->i depend on ->.
2016-06-08 14:43:58 -05:00
Leif Andersen
c735c88c2d Add examples for resolve-module-path-index docs. 2016-06-08 14:38:07 -04:00
Asumu Takikawa
2a222a8f15 Add examples for _? C type 2016-06-07 15:19:59 -04:00
Asumu Takikawa
f0003da766 Improve docs for _box C type 2016-06-07 14:37:12 -04:00
Matthew Flatt
416c9ecec0 fix GC dump printing for 64-bit Windows 2016-06-06 06:25:26 -07:00
Asumu Takikawa
d9cf3c0805 Add examples for _list and _vector in the FFI docs 2016-06-03 17:01:48 -04:00
Bernardo Sulzbach
c98986c622 Corrected a few typos in INSTALL.txt 2016-06-02 13:39:39 -05:00
Chris Jester-Young
4829dd2d5d Gitorious has been acquired by GitLab. 2016-06-02 13:39:39 -05:00
Leif Andersen
81eb6bf4c0 The 'dummy' field in 'mod' really should be in its own paragraph. 2016-06-01 15:22:04 -04:00
Jay McCarthy
8b7f426fac Merge pull request #1334 from cky/fix-numeric-entity-description
Fix description of the `#x20` X-expression
2016-05-28 20:40:03 -04:00
Chris Jester-Young
e13917adec A #x20 X-expression converts to &#x20;, not &#20;. 2016-05-28 15:53:31 -04:00
Sam Tobin-Hochstadt
74723e3e95 Move to correct directories. 2016-05-27 17:20:35 -04:00
Sam Tobin-Hochstadt
866c65e096 Merge remote-tracking branch 'compiler/master' into merge-net-compiler 2016-05-27 17:19:58 -04:00
Sam Tobin-Hochstadt
6c9a3f0555 Merge remote-tracking branch 'net/master' into merge-net-compiler 2016-05-27 17:19:52 -04:00
Matthew Flatt
9b60f6b767 fix typo 2016-05-27 07:27:04 -06:00
Matthew Flatt
c1c427a281 move '#%utils implementation into "collects/racket/private".
For now, this copies the code of "startup.rktl". The intent is that
"startup.rktl" will go away with a new bootstrap process.
2016-05-27 06:23:40 -06:00
Matthew Flatt
94c636fe2b remove unneeded #%utils reference 2016-05-26 17:08:10 -06:00
Matthew Flatt
e4020cb591 fix typo 2016-05-26 17:08:10 -06:00
Leif Andersen
cb9d08d2ee Forgot to update the contract on resolve-module-path 2016-05-25 16:34:33 -04:00
Leif Andersen
42e27fb4f7 Add tests for resolve-module-path-* with optional argument 2016-05-23 20:48:59 -04:00
Leif Andersen
c3313b13dc Make relative directory argument for resolve-module-path-* have a default to #f
The resolve-module-path-* functions effectively already had a default argument,
which is #f, this allows you to just directly call it with one argument.
2016-05-23 20:48:59 -04:00
Jay McCarthy
5e43c190be Fix issue 1329 2016-05-23 20:32:37 -04:00
Vincent St-Amour
62a44c0ca8 Tests for blame completeness. 2016-05-20 14:25:04 -05:00
Vincent St-Amour
a1ca38f30e Move some contract helpers. 2016-05-20 14:24:59 -05:00
Vincent St-Amour
26663bb2d7 Have opt/c and ->i put on impersonator-prop:blame.
To be consistent with other combinators.
2016-05-20 14:24:56 -05:00
Vincent St-Amour
d86c69fc21 Fix arity error message. 2016-05-20 14:24:52 -05:00
migeed-z
8d082a47c6 Typo; hypen -> hyphen 2016-05-20 14:21:31 -05:00
Leif Andersen
fe03198211 Updated docs to add examples for module->* functions. 2016-05-19 19:01:04 -04:00
Ben Greenman
afec68f639 typo: can #f -> can be #f 2016-05-19 17:43:48 -04:00
Leif Andersen
8111e4ec99 Updated docs to cause resolve-module-path-index and module-path-index-resolve to link to each other. 2016-05-19 12:23:50 -04:00
Robby Findler
d0d85b2f31 fix source locations for listof applications
and any other contract that is defined via
define/subexpression-pos-prop
2016-05-18 19:32:41 -05:00
Leif Andersen
eb17a041ab Updated ZO documentation for global-bucket. 2016-05-18 16:32:38 -04:00
Matthew Flatt
c0fa2eecd5 add module-compiled-indirect-exports and co.
That information is needed sometimes to compile expanded syntax to
bytecode form.
2016-05-18 13:13:15 -06:00
Matthew Flatt
f1bba3c2d0 another fix to serializer for cycles containing immutable
When walking up the cycle chain to find the mutable item,
intermediate items need to be marked as potentially
shared, and a mutable item should not be added more
than once.
2016-05-16 19:12:10 -06:00
Matthew Flatt
6ba3461738 fix serializer for cycles containing immutable structs 2016-05-16 18:06:18 -06:00
Ryan Culpepper
add08c902d syntax/parse: record nullability in ehpat
Non-nullable ellipsis-head patterns can omit the null match check.
2016-05-16 17:47:45 -04:00
Ryan Culpepper
3da626d483 syntax/parse: add nullability analysis and check ellipsis-head patterns
Currently logs a warning and continues, but eventually this should be a
compile-time error.
2016-05-16 17:13:57 -04:00
Ryan Culpepper
fb5c1310d8 syntax/parse: add dynamic check for null ellipsis-head match
Otherwise, nullable ellipsis-head patterns could cause infinite loop.
2016-05-16 17:13:57 -04:00
Ryan Culpepper
669460da34 syntax/parse: parse side clauses directly as action patterns
Eliminates the clause:* structures.
2016-05-16 17:13:57 -04:00
Matthew Flatt
f327a44080 fix begin-for-syntax under splicing-let
This fixes an immediate problem, but the macro expander should have
complained about an unbound `maybe` at phase 2. (A new implementation
of the macro expander detected the unbound `maybe`.)
2016-05-16 13:07:44 -06:00
Ryan Culpepper
c9074c26dc syntax/parse: fix ellipsis "optimization" for null tail pattern
The transformation also has the effect of making ellipsis patterns
with nullable heads, such as ((~seq x:sc ...) ...), terminate
rather than looping forever.

To do: add null eh match check and error.
2016-05-16 10:35:20 -04:00
Matthew Flatt
2109b26c15 repair for hash-table adjustment
Fix 49fd1e41da for some compilers.
2016-05-15 21:06:23 -06:00
Matthew Flatt
a134d0c0a3 racket/serialize: support keywords and regexp values 2016-05-15 20:03:15 -06:00
Matthew Flatt
b243ce894a GC: give main allocation pages back to the GC less eagerly 2016-05-15 17:44:58 -06:00
Matthew Flatt
7fbe6a4097 GC: avoid trying to prime a full page cache 2016-05-15 17:44:58 -06:00
Matthew Flatt
49fd1e41da improve immutable hash table on sequential inserts
Inserting keys with sequential hash codes --- as in 0, 1, 2, 3, etc.
--- performed badly compared to random keys, because it triggered the
worst case of allocation: allocate a node of size 1, then 2, then 3,
then 32, then 32 plus a subtree of size 1, then 32 plus a subtree of
size 2, and so on. By rearranging the bits in a hash code, arrange
for nodes that are more like 4-wide instead of 32-wide. In other
words, the tree become wider with thinner branches, instead of growning
just as a thick branch to the left.

Of course, there's now a different sequence of inserts that used
to perform well and now perform badly (the inverse of the new
reordering), but that case seems much more likely than the cae
of sequential inserts.
2016-05-15 17:44:58 -06:00
Ryan Culpepper
80364d85dd syntax/parse: add progress-ordering to ~and
In (~and p1 p2), a failure in p2 now always dominates a failure in p1.
Consequently, if a pattern succeeds, its failures don't matter.

Add {pat,hpat,action}:ord wrappers, ord prframes. Apply ordering to
main pattern and side clauses. Add better progress analysis to
eliminate order wrapping.
2016-05-13 14:40:16 -04:00
Ryan Culpepper
158f087d8e syntax/parse: remove attrs from pattern structs, desugar hpat:optional 2016-05-13 14:40:16 -04:00
Ryan Culpepper
91a03eecb3 syntax/parse: add separate pattern for simple vars 2016-05-13 14:40:16 -04:00
Matthew Flatt
678369f187 avoid generating shared call code for too many arguments
Although the JIT would not try to use a block of shared code for more
than a certain number of arguments, it could in rare cases (related to
self tail calls, for example) generate the code and attempt to install
it in the array of shared-code pointers.
2016-05-13 11:56:48 -06:00
Matthew Flatt
b09b5c6184 fix doc link 2016-05-13 11:56:48 -06:00
Ryan Culpepper
731c7dfe12 fixed doc typo 2016-05-11 16:14:53 -04:00
Matthew Flatt
1149d6cdcd ffi/unsafe: add checking of _array values
When an array value is provided, make sure that it's an array
with at least the expected length (or longer) and same element
layout. That's weaker than checking that the array elements have
the right type, because an `eq?` check at the ctype layer seems
too strong, and the ctype API doesn't provide enough information
for a more flexible equality.
2016-05-10 10:56:32 -06:00
Matthew Flatt
d92be80f77 unbreak line-based flushing
Repairs a problem introduced by 8e7792d85a.
2016-05-09 12:49:06 -06:00
Matthew Flatt
8e7792d85a reduce overhead for simple port char/byte reads/writes
Cut the overhead by 30% or so by making the fast path need less
cooperation with the GC.
2016-05-09 09:11:47 -06:00
Matthew Flatt
6c9a4cb470 avoid a compiler warning 2016-05-05 15:19:47 -06:00
Matthew Flatt
9046d30bcf fix grammar in docs for #%provide 2016-05-05 15:19:47 -06:00
John Clements
5961313e50 Merge pull request #1323 from jbclements/make-match-exn-transparent
make match exception transparent
2016-05-04 20:00:29 -07:00
John Clements
7c26614343 make match exception transparent
This push makes the exn:misc:match exception transparent. This
matches other racket-raised user exceptions.

The motivation for this change was breakage in the handin-server;
specifically, the discussion in

https://groups.google.com/forum/#!topic/racket-users/nEos3-osoWE

...in which the handin-server was not behaving the same on exn:misc:match
because it was not transparent. This caused the handin server to
refuse to rewrite these exceptions, resulting in less helpful
messages for users.
2016-05-04 14:19:04 -07:00
Ryan Culpepper
9d3c193bcf syntax/parse: fix ~datum pattern with compound datum 2016-05-03 05:07:29 -04:00
Ryan Culpepper
430e6e9567 syntax/parse: different fix for deterministic compilation
The previous fix (1acaf011) caused a performance regression
(compilation time?), reported by stchang. Reverting to quote.

Apparently, the problem with gensym and deterministic compilation
isn't the uninterned-ness; it's the global counter used for the
name. So use a compilation-local counter instead.
2016-05-03 04:38:26 -04:00
Ryan Culpepper
c8f3536694 Revert "syntax/parse: fix for deterministic compilation"
This reverts commit 1acaf0111d.
2016-05-03 03:11:08 -04:00
Ryan Culpepper
f7fff58de6 syntax/parse: test different post groups are incomparable 2016-05-03 03:11:08 -04:00
Asumu Takikawa
25c9e9347a Fix nested quasisyntax infinite looping
Thanks to Michael Ballantyne for the bug report
2016-05-02 15:15:47 -04:00
Pedro Caldeira
551ef55535 Add examples for _enum and _bitmask usage. (Close #1317) 2016-05-02 11:21:22 -05:00
Matthias Felleisen
fdcbe249f9 re-organized in preparation for additions 2016-05-01 09:47:39 -04:00
Matthew Flatt
76418e9be8 path->module-path: make sure result is always a module path
Avoid creating a result that is intended as a module path but
has elements that are not syntactically allowed, such as a "."
in a collection-path element.
2016-05-01 07:00:36 -06:00
Robby Findler
244d9957f1 fix syntax error in flat-contract-with-reason docs 2016-05-01 06:27:44 -05:00
Robby Findler
999f026f55 add docs for flat-contract-with-explanation, clarify make-flat-contract docs
closes #1313, related to #1314
2016-04-30 21:06:41 -05:00
Robby Findler
9acd36724d clarify test argument to make-contract, make-chaperone-contract, and make-flat-contract
closes #1313
2016-04-30 21:06:41 -05:00
Robby Findler
bb03281308 add flat-contract-with-explanation
closes #1314
2016-04-30 21:04:08 -05:00
Vincent St-Amour
caebbc65b6 Add example to the free-vars docs.
Thanks to Christophe Scholliers.
2016-04-27 11:02:59 -05:00
Robby Findler
45acc19f44 improve source location in internal-definition errors for syntax-case,
syntax-case*, and datum-case
2016-04-26 16:09:30 -05:00
Matthew Flatt
fb88abd992 fix accidentally committed debugging mode 2016-04-26 14:32:08 -06:00
Matthew Flatt
528b14025f fix syntax-local-lift-module-end-declaration in higher phases
A phase shift was mising on `begin-for-syntax`es introduced by
`syntax-local-lift-module-end-declaration`, which is in turn
used to implement` module+`, so `module+` didn't work under
two or more `begin-for-syntaxes`.

Closes #1312
2016-04-26 10:45:56 -06:00
Matthew Flatt
99b3ed55be make syntax objects work as preserved syntax properties
Syntax objects generally make sense as properties in other syntax
objects, but they require special care when marshaling to bytecode
(as syntax objects do in general). To make that special handling
possible and reliable, constrain the shape of allowed values.
2016-04-26 10:18:46 -06:00
Leif Andersen
f549724e36 Updated scribble docs for make-constructor-style-printer
It should be using gen:custom-write rather than prop:custom-write.
2016-04-25 19:18:11 -04:00
Vincent St-Amour
5cc030e2ad Avoid redundant checking. 2016-04-25 15:41:27 -05:00
Vincent St-Amour
264a11f899 Add procedure-impersonator*?.
Mostly useful to determine whether using `unsafe-chaperone-procedure` is ok.
2016-04-25 15:41:19 -05:00
Matthew Flatt
1381b3ca36 correct and improve docs on number printing 2016-04-25 10:07:32 -06:00
Matthew Flatt
35ab9ffdb8 rename relectly added path-extension to path-get-extension
The name `path-extension` created a conflict for an existing
registered package, so it should not have been added to
`racket/path`.

Also, `path-get-extension` was intended to work on a path
that is syntactically a directory, so fix and test that.
2016-04-24 20:30:51 -06:00
Matthew Flatt
18fd9949a6 fix unmarshaling of perserved syntax properties
Unmarshaling was broken for a syntax object that doesn't have
a 'paren-shape property.
2016-04-24 07:19:02 -06:00
Robby Findler
68b8bf760a make #f always coerce into the same (eq?) contract and make
(or/c #f #t) (or (or/c #t #f)) coerce into the same thing
that boolean? coerces into (and make that also always be eq?)
2016-04-22 15:43:19 -05:00
Robby Findler
bbac97129e avoid an extra call to the contract-specific method for checking stronger
Before this commit, when contract-stronger? is called, it would not
be able to return #f until it calls the contract-specific stronger
method twice
2016-04-22 14:54:33 -05:00
Ryan Culpepper
1acaf0111d syntax/parse: fix for deterministic compilation
Lift compile-time gensyms to vars bound to run-time gensyms.
2016-04-22 09:54:30 -04:00
Ryan Culpepper
accb87eddc syntax/parse: add more tests 2016-04-22 09:54:30 -04:00
Matthew Flatt
b523c9c13f local-transformer-expand: catch lifts in 'top-level mode
Change the one expansion mode as far as I can tell) that disables
lifts so that lifts are now allowed, which means that
`(syntax-transforming?)` implies `(syntax-transforming--with-lifts?)`.

The old documentation incorrectly characterized when lifts
were allowed. Ryan noticed the documentation problem, and that
observation led to this simplication.
2016-04-21 13:58:05 -06:00
Matthew Flatt
9ff64fc6ed GC: guard against excessive fragmentation in incremental mode
Although excessive fragmentation is already detected at the end
of a major GC, it can get out of hand already during a long
incremental phase. So, check for excessive fragmentation and
bail out to a major GC when it happens.

Related to PR 15287
2016-04-19 16:26:42 -06:00
Robby Findler
fa4a6d4c13 fix the 'just check existence' part of object/c contracts 2016-04-19 14:07:50 -05:00
Matthew Flatt
d8c9ae8057 update tests for string->url and path-absolute? 2016-04-19 08:12:12 -06:00
Matthew Flatt
3b1b4a0d26 string->url: always mark as absolute when a host is present
Fixes a failure in the web server tests caused by d23b296627.

Formerly, `(string->url "http://racket-lang.org")`, with no trailing
slash, would produce a `url` structure with `path-absolute?` as #f.
That doesn't exactly make sense, because a URL with a host must always
have an absolute path component. Claiming a relative path component
interacts badly with extending a URL with a path later. (Although
`combine-url/relative` compenstate, a similar function in the web
server doesn't.) The revised `url->string` always sets `path-absolute?`
to #t when a host is present, and whether the path is empty or contains
an empty string still records whether a trailing "/" was present.

The `url->string` function, meanwhile, now needs to use whether the
path is empty to determine whether a "/" should be added after
the host name, not whether `path-absolute?` is true.
2016-04-19 05:42:07 -06:00
Matthew Flatt
ddd4190edf GC: improve backtrace info for 'interior pointers 2016-04-19 05:25:07 -06:00
Matthew Flatt
84bffd41af GC: fix backtrace reporting
The addition ot limited recursive marking broke the implementation
of memory-debugging backtraces.
2016-04-18 18:39:20 -06:00
Matthew Flatt
027dd9a43c untgz and gunzip: report unexpected end-of-file
Report an explicit "unexpected end-of-file" error instead of
a later contract failure on #<eof> insteda of a byte

Closes #1204
2016-04-18 08:25:41 -06:00
Matthew Flatt
734d81fed1 clarification on PLT_VALIDATE_COMPILE
Closes #1181
2016-04-18 08:25:41 -06:00
Ryan Culpepper
837fe2a91a use group-by 2016-04-18 09:13:11 -04:00
Ryan Culpepper
6da3e88bd8 fix and update syntax/parse/debug 2016-04-18 09:13:11 -04:00
Ryan Culpepper
4e6438eaf2 syntax/parse: add groups of post progress
This is a partial solution to the ~and problem, only for side clauses.
In (~and p1 p2 p3), one often wants errors in p2 to take precedence over
errors in p1, and likewise for p3 over p2. One solution is ~commit, but
that prevents backtracking. Another is ~post, but then two ~post wrappers
are needed around p3. Also, it doesn't make sense to compare progress of
the third #:with clause from stxclass A to the second #:with clause of
stxclass B and say third beats second.

So, generalize 'post to (post group index); post frames are comparable to
each other only if group is the same, then compared by index. (Post still
beats CAR and CDR.) Each set of side clauses shares a group.

For simplicity of code generation for now, use gensyms to identify groups.
2016-04-18 09:13:11 -04:00
Matthew Flatt
51061c0829 fallback for sqlite3_clear_bindings
Work with older SQLite, such as the one with Fedora 6

Closes #769

Merge to v6.5
2016-04-17 14:24:52 -06:00
Matthew Flatt
dda791c8cb remove unneeded use of long-double function
Using stdtold() instead of strtod() causes trouble with the
version of gcc on Fedora 6.

Merge to v6.5
2016-04-17 11:35:50 -06:00
Matthew Flatt
f75729ef41 raco pkg: improve error reporting for bad URLs
Related to #1257
2016-04-17 09:10:06 -06:00
Matthew Flatt
6b522f50da updated test and docs for url->string and srtung->url
Test and document host-plus-absoulte-path constraint on string forms.
2016-04-17 09:05:16 -06:00
Matthew Flatt
d23b296627 URL string conversions: disallow host plus relative path
Closes #1257
2016-04-17 09:02:19 -06:00
Matthew Flatt
1fb0f4d143 improve docs for path-only
Closes #1289
2016-04-17 08:36:43 -06:00
Matthew Flatt
a0b5403bd8 Tests and docs for an IPv6 literal address as host in a URL 2016-04-16 21:30:26 -06:00
Matthew Flatt
53ffad767b net/url-string: support URLs that contain IPv6 literals
Since an IPv6 literal address includes ":"s, it must be written
between "[" and "]" as a host name.

Based on a patch by @Phlosioneer and comments by @Blaisorblade,
with additional changes to make `url->string` work.

Closes #980
Closes #1243
2016-04-16 21:19:33 -06:00
Matthew Flatt
8993398033 Add #:name and #:extra-name to struct
A `#:name` identifier picks the name that is bound to static
information about a structure type. An `#:extra-name` identifier
specifies an additional name to be bound to the information.
This pair of options is analogous to `#:constructor-name`
and `#:extra-constructor-name`.

Based on Jen Axel's suggestion and implementation.

Closes #1309
2016-04-16 18:39:48 -06:00
Matthew Flatt
4d9427af44 add path-extension, path-has-extension? and path-{add,replace}-extension
Provide a cleaned-up set up path-extension functions. In contrast
to `path-{add,replace}-suffix` and `filename-extension`, a dot
at the beginning of a path element is not treated as an extension
separator. Also, `path-extension` returns an extension including
its separator, which is more consistent with other extension
functions.

The new `path-has-extension?` function replaces many uses of
regexp matching in the base collections.

Closes #1307
2016-04-16 17:56:34 -06:00
Matthew Flatt
1e597a885c reorganize docs for raco make-related APIs
Closes #1293
2016-04-16 11:06:20 -06:00
Matthew Flatt
467979cd8b improve docs for compile-file
Clarify that it expects to be called via
`with-module-reading-parameterization`.

Closes #1291
2016-04-16 10:56:50 -06:00
Matthew Flatt
446b93882c fix docs for path-add-suffix
Adjusts the docs, but a future replacement (possibly with a new name
to avoid compatibility issues) should behave like the old docs,
instead.

Closes #1292
2016-04-16 10:47:49 -06:00
Matthew Flatt
4cc3aad30b fix problem with (open-input-file #:for-module? #f ...)
Also, clarify failure handling in the docs.

Closes #1298
2016-04-16 10:34:18 -06:00
Matthew Flatt
a6e773f69b fix syntax checking in for/vector
Closes #1308
2016-04-16 09:48:08 -06:00
Eric Dobson
8fccc07259 Fix docs for call-with-atomic-output-file (#1192) 2016-04-16 09:40:36 -06:00
Spencer Florence
123755437c remove bad srcloc from define-runtime-path (#1203) 2016-04-16 09:39:28 -06:00
Matthew Flatt
2dce66925a update HISTORY.txt for v6.5
Merge to v6.5
2016-04-16 07:01:38 -06:00
Matthew Flatt
e1a5e41ddc The set of environment variables accessible via getenv is
restricted through `get-info`, which prunes the environment
variable set before it loads the "info.rkt" file. All
environment variables are pruned except those listed in
`PLT_INFO_ALLOW_VARS` (separated by semicolons).

Related to emina/rosette#17.
2016-04-15 09:56:59 -06:00
Matthew Flatt
f2b76a675a make raco exe -l cooperate with tethered-executable builds
The configuration of an addon-tethered directory is treated as a sign
that access to collections in the "user" space should be accessible by
default in a launcher, as well as propagating the addon-directory
setting to the launched program.
2016-04-15 06:54:00 -06:00
Matthew Flatt
6369e56709 add support for tethering to a config or addon dir
Add a hook to `raco setup` to make copies of installed executables,
where the copies start with the configuration or addon directory
of creation time, instead of the default installation or user-specific
path.

Although the same effect can be achived by setting environment
variables such as PLTADDONDIR, tethered executables can be easier
to work with and compose better with other programs.

See also #1206 for some discussion, although this change does
not exactly address the original idea there.
2016-04-15 06:42:15 -06:00
Gustavo Massaccesi
91d6c69565 Avoid compiler warning 2016-04-13 19:23:56 -03:00
Gustavo Massaccesi
b93d94bb67 optimizer: allow duplication of toplevels 2016-04-11 23:08:23 -03:00
Gustavo Massaccesi
2d0f8f6c0f reduce (unbox (box x)) and extend reductions to unsafe-cXr
Reduce (unbox (box x)) => x

Extend the reductions for cXr to the unsafe versions, for
example reduce (unsafe-car (cons x y)) => x

Check and save types in unsafe operations
2016-04-11 21:14:22 -03:00
Gustavo Massaccesi
c4e5a0b190 check for single value expressions in ensure_single_value
Only wrap the argument when the optimizer is not sure that
it is a single valued expression. This allows to remove the
checks in the calling sites.
2016-04-11 21:13:37 -03:00
Vincent St-Amour
f33a4ba471 Fix ->* pre/desc and post/desc handling. 2016-04-11 17:12:23 -05:00
Vincent St-Amour
ee43151154 Fix doc typoes.
Found by Josep Portella Florit.
2016-04-11 14:14:36 -05:00
Robby Findler
6ad9a6cdf8 avoid platform-specific problems in test case 2016-04-11 08:53:03 -05:00
Robby Findler
3636e35480 more compiler/cm log message cleanup 2016-04-10 21:23:12 -05:00
Robby Findler
d83fbf81f3 fix typo 2016-04-10 21:23:12 -05:00
Robby Findler
e846db0937 add a test case for current-path->mode
I should have included this in 20e2e839cb
2016-04-10 21:23:12 -05:00
Matthew Flatt
c0bbfe8237 fix raco pkg show --rx on bad patterns
Fix error reporting so it's not an internal error. Also,
report errors before printing a scope, and update the docs
for earlier changes.

Closes #1251
2016-04-08 19:10:56 -06:00
Matthew Flatt
13ebd0e1c8 adjustments for regexp failure handler
Pass a string to the handler to describe the problem.
Also, fix minor issues (GC registration, contracts and `history`
in docs) and make `pregexp`, etc., report compilation errors as
`pregexp`, etc.
2016-04-08 18:34:51 -06:00
Asumu Takikawa
436fca7134 Add optional failure thunk for regexp and friends 2016-04-08 17:15:39 -06:00
Matthew Flatt
c59e1a2ea9 Add note about MMTabBarView 2016-04-08 09:37:14 -06:00
Matthew Flatt
7a339f45b9 Merge pull request #1303 from jsmaniac/doc-changes
Update to the package template + small documentation changes
2016-04-08 09:37:04 -06:00
Vincent St-Amour
249e8eabab Post-release version for the v6.5 release 2016-04-07 11:43:45 -05:00
Georges Dupéron
c0b6378e49 Updated package template.
* Add 6.4 version, as this is now the default one to download on the website.
* raco doc <<name>> should use raco docs <<name>>
* raco is now on the PATH, remove warning
* Change `raco setup --check-deps <<name>>` to `raco setup --check-pkg-deps --pkgs <<name>>` (the former seems obsolete).
* Move `raco pkg install --deps search-auto` to the `install:` section, so that it is done before running the tests
* Move `raco pkg install --deps search-auto cover`, to the `after_success section`, since `raco cover` is run there.
* Fixed .travis.yml syntax (wrong indentation for fields under "matrix:")
* Clone https://github.com/greghendershott/travis-racket.git to a separate directory, not a subdirectory of the current package, as this can cause problems (see https://travis-ci.org/jsmaniac/type-expander/jobs/121099218#L824)
2016-04-07 15:01:01 +02:00
Georges Dupéron
8db8e643bb Fixed typo in documentation. 2016-04-07 15:01:01 +02:00
Georges Dupéron
b0cad81f2d Clarification and typo in the documentation concerning the error messages for the ~between pattern in syntax/parse. 2016-04-07 15:01:01 +02:00
Robby Findler
a1ba579666 avoid defeating an optimization in the loggging code during raco make 2016-04-03 20:49:24 -05:00
Matthew Flatt
6a5b7ae9f9 add raco exe test for a submodule reference from a submodule 2016-04-01 16:23:00 -06:00
Matthew Flatt
976c5e6e2b zo parse & marshal updates for preserved syntax properties 2016-03-09 19:35:02 -07:00
Matthew Flatt
209a4ff631 decompile: avoid single-subexpression begin0
At the bytecode level, `(begin0 E)` does not make E in tail position
with respect to the `begin0` form. It does at the source level, so
generate suitable source.
2016-03-05 05:49:05 -07:00
Tony Garnock-Jones
053ca45b22 Add @history note to the new SRV dns function documentation. 2016-02-21 12:56:58 -05:00
Tony Garnock-Jones
8e05211169 Support SRV records in net/dns.
The new `dns-get-srv` returns a *list* of srv-rr structs, rather than
zero or one. A general-purpose RR-lookup routine, `dns-lookup`, exists
but is not exported for now since its API needs work. See comments in
net/dns.rkt.
2016-02-21 11:43:20 -05:00
Matthew Flatt
2a1dd00320 bytecode updates for v6.4.0.8 2016-02-14 06:44:39 -07:00
Stephen Chang
b37d322638 add history for url-regexp 2016-02-10 13:34:11 -05:00
Stephen Chang
a321c85a29 update string->url doc with better regexp
to sync with e6a0caa147
2016-02-10 13:13:12 -05:00
Sam Tobin-Hochstadt
c2d31b14f7 Yet another IP for Northwestern.
Also make test failures more informative.
2016-02-10 09:39:24 -05:00
Sam Tobin-Hochstadt
f4beeeb7e1 Increase timeout. 2016-02-05 17:58:59 -05:00
Matthew Flatt
865ecfb159 restore tests
Accidentally left commented out in 73a010841f.
2016-01-13 20:21:53 -07:00
Sam Tobin-Hochstadt
6261cc5f18 Correctly use installation scope everywhere. 2016-01-11 15:39:33 -05:00
Spencer Florence
0fbf0343b9 fixed more cover flags 2016-01-10 10:16:22 -06:00
Spencer Florence
220ee74abe added correct deps for cover 2016-01-10 10:06:15 -06:00
Spencer Florence
0435a3639d fixed call to cover in travis build 2016-01-10 09:58:31 -06:00
Spencer Florence
db250c4cf9 fixed -c error
Closes #1.
2016-01-10 10:16:03 -05:00
Sam Tobin-Hochstadt
12927d0e8b Avoid writing to the current directory in this test. 2016-01-09 22:52:18 -05:00
Matthew Flatt
fe8a2fd801 docs: suggest 'pure for current-https-protocol 2016-01-06 12:27:42 -07:00
Matthew Flatt
fce78e65b3 add net/osx-ssl docs 2016-01-06 11:17:33 -07:00
Matthew Flatt
2ad4ca6776 update net/win32-ssl docs for 'secure 2016-01-06 11:17:33 -07:00
Matthew Flatt
f9d224929c change pkgs reference to HTTPS 2016-01-06 09:04:20 -07:00
Matthew Flatt
73a010841f add raco exe test with place 2016-01-04 10:59:17 -07:00
Matthew Flatt
d60185045c compiler/zo-marshal: enable marshal of top-level require 2016-01-03 06:44:07 -07:00
Matthew Flatt
423feb1e21 fix unmarshal of top-level "root" scope
Closes #9
2016-01-03 06:40:41 -07:00
Jay McCarthy
cfc28ee82a Implement . ignoring directly in test, because module suffixes has other uses 2015-12-01 14:21:05 -05:00
Jay McCarthy
091db74ab6 Don't include directory when using default suffixes 2015-11-30 08:29:54 -05:00
Matthew Flatt
57a156351d doc refinments and corrections
Adjust docs to match the final, less exposed mechanism for
initializing parameters from environment variables.
2015-11-19 16:10:01 -07:00
Tim Brown
ef8f42f5b0 doc and test in support of racket/racket PR 1080 2015-11-19 16:09:54 -07:00
Tim Brown
43742a9205 new entries for current-proxy-servers et al. 2015-11-19 10:08:41 -07:00
Matthew Flatt
5f1d902432 tests and docs related to race repair 2015-11-09 20:12:04 -07:00
Sam Tobin-Hochstadt
63c901f26d Handle both possible results from the NWU name server. 2015-11-06 17:22:52 -05:00
Sam Tobin-Hochstadt
7f01f8e8a5 Remove env var the correct way. 2015-11-05 11:39:21 -05:00
Sam Tobin-Hochstadt
9928bb4395 Ensure that GIT_DIR isn't set while running this test.
Fixes failure on DrDr. Also remove debugging output.
2015-11-04 18:32:54 -05:00
Sam Tobin-Hochstadt
b773c328d2 More drdr debugging of this file. 2015-11-04 10:57:36 -05:00
Sam Tobin-Hochstadt
8e7fa0f706 net/sendurl: Avoid touching preferences until needed. 2015-11-04 10:41:15 -05:00
Matthew Flatt
ba661e009b net/sendmail: delay executable search until needed 2015-11-04 08:00:59 -07:00
Sam Tobin-Hochstadt
f378aa1b7a Fix silly mistake. 2015-11-03 08:58:51 -05:00
Sam Tobin-Hochstadt
fb9a6a0484 Add some output to try to debug this test on DrDr. 2015-11-03 08:46:20 -05:00
Jay McCarthy
3385eeb32f error from Jon Stenerson 2015-10-30 13:49:59 -04:00
Matthew Flatt
d3c03ee793 remove redundant (and now out-of-date) tests 2015-10-12 15:48:58 -06:00
Matthew Flatt
00ef691ff2 update tests and docs for Windows path encoding in URLs
See 5afdae8af9 in the main repo.
2015-10-12 08:50:46 -06:00
Matthew Flatt
23e2b806a2 git-checkout: document and test #:strict-links? 2015-10-02 09:34:46 -06:00
Matthew Flatt
37814da758 add tests for net/git-checkout 2015-10-02 09:07:28 -06:00
Jay McCarthy
02de19eb6f who? me? 2015-09-17 15:02:16 -04:00
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
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
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
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
Matthew Flatt
6632070f75 repair test for new compilation-top field 2015-09-05 17:39:31 -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
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
adbeebabaf raco test: recognize extensible set of module suffixes
Use the new `compiler/module-suffix` library.
2015-08-22 09:48:05 -06:00
Sam Tobin-Hochstadt
5ef6a2662d Missing in-list calls. 2015-08-20 12:27:54 -04:00
Vincent St-Amour
1d9e2003ac Remove dependency on unstable/struct. 2015-08-19 14:15:55 -05:00
Sam Tobin-Hochstadt
b8055ffaa5 Increase timeout for demod-test. 2015-08-14 11:59:18 -04:00
Matthew Flatt
c3d1c9967f extra output on failure for tests/compiler/zo 2015-08-14 07:25:35 -06:00
Matthew Flatt
490b10483a compiler/zo-marshal: fix handling of cyclic scope data
Insert CPT_SHARED as needed to break cycles within scope data.
2015-08-14 06:32:05 -06:00
Vincent St-Amour
b1d8d77b78 Use in-slice from racket/sequence. 2015-08-13 10:39:57 -05:00
Vincent St-Amour
08c406bcff Remove unused deps. 2015-08-13 10:38:51 -05:00
Tim Brown
9f1489030c url-strings: Test and Documentation Changes
T&D for url-strings-branch which separates URL parsing from
url network actions.

url-string changes requested by mflatt

url-string has been renamed from url-strings

documentation and tests reflect that
2015-08-12 11:02:16 -05:00
Matthew Flatt
d652ea0d52 update demodularizer for recent bytecode changes 2015-08-10 16:45:47 -06:00
Blake Johnson
08a40b5998 repair reference to "dummy" top level
The demodularizer used to include multiple dummy toplevels from every
module that needed one, which didn't work with the unresolver. That
change makes it so all references to dummy toplevels point to the same
one.
2015-08-10 16:37:09 -06:00
Matthew Flatt
92e9ac99f5 update for with-immediate-continuation-mark and scope IDs 2015-08-07 15:22:10 -06:00
Matthew Flatt
2a354af4e3 adjust version in history note
Promote v6.2.0.x change to v6.3, since it will not be in v6.2.1.
2015-07-30 14:52:23 -06:00
Matthew Flatt
cb1c9aabe6 fix dependency 2015-07-29 07:24:16 -06:00
Jay McCarthy
efbd424ec0 Add test-include-paths and allow test-omit-paths to use regexps 2015-07-28 14:19:32 -06:00
Matthew Flatt
b3887f37d3 fill in some missing sharing
Make `zo-marshal` consistent with `racket`, so that round-trip testing
works.
2015-07-23 07:46:28 -06:00
Matthew Flatt
03751ec33a Revert "update for revised bytecode"
This reverts commit 6933512ec2.

The bytecode-format change was reverted.
2015-07-22 20:26:38 -06:00
Matthew Flatt
a10e570edd tests for submodules+source
It happens that an old test also covers submodules+collects-dest, due
to a change in a module implementation to refer to a submodule.
2015-07-22 10:53:30 -06:00
Matthew Flatt
6933512ec2 update for revised bytecode 2015-07-21 13:30:02 -06:00
Sam Tobin-Hochstadt
75ceafbf51 Fix http client tests for 33717eebaa in plt/racket. 2015-07-21 13:43:27 -04:00
Robby Findler
5ad76a703d add documentation and a contract for send-url/mac 2015-06-28 17:01:27 -05:00
Konrad Hinsen
1b6f2356e7 Simplified browser configuration for MacOS X
Add an optional #:browser argument to send-url/mac and export it.

This makes it straightforward to use different browsers and/or to
configure a different one:

    (require net/sendurl)
    (external-browser (lambda (url) (send-url/mac url #:browser "Conkeror")))
2015-06-28 16:54:40 -05:00
Matthew Flatt
c431d34955 repair to decompiler printing of eq hash tables 2015-06-27 06:42:50 +08:00
Matthew Flatt
8e617a6e5b fix decoding of free-identifier=? alias information 2015-06-27 06:42:50 +08:00
Matthew Flatt
3d46070994 add structures, decoding, and encoding for zo syntax objects 2015-06-27 06:42:50 +08:00
Matthew Flatt
56a8886525 update to 6.2.0.18 bytecode format 2015-06-27 06:42:50 +08:00
Matthew Flatt
6a2e75c454 adjust bindings-table encoding 2015-06-27 06:42:50 +08:00
Matthew Flatt
bbfdc73e5d update for inspector descriptor in prefix bytecode 2015-06-27 06:42:50 +08:00
Matthew Flatt
29d86bcaac sync with new macro system bytecode format 2015-06-27 06:42:50 +08:00
Matthew Flatt
f23b6f8d46 adjustments for compiled-module content 2015-06-27 06:42:50 +08:00
Matthew Flatt
86a410dc0c adjust for new syntax-object representation and marshaling 2015-06-27 06:42:50 +08:00
Matthew Flatt
3da4b863cf add raco read 2015-06-03 11:53:11 -06:00
Sam Tobin-Hochstadt
00893cbd3f Avoid timeouts now that raco test enforces them. 2015-05-26 12:17:58 -04:00
Sam Tobin-Hochstadt
0acb35ddbb Try using cover for code coverage. 2015-05-26 12:13:22 -04:00
Spencer Florence
2de9cf42eb fix default timeout 2015-05-26 06:39:46 -06:00
Sam Tobin-Hochstadt
4a82b01845 Merge pull request #2 from florence/fix-travis-display
Fix display missing errors on travis
2015-05-20 16:03:50 -04:00
Sam Tobin-Hochstadt
9de3f8b87f Depend on new "plai-lib" pkg. 2015-05-20 15:58:10 -04:00
Matthew Flatt
88551aa8c6 git-checkout: add #:initial-error argument 2015-05-16 16:22:08 -06:00
Ryan Culpepper
dfac49e597 add memory use and random roundtrip tests for net/uri-codec 2015-05-12 18:35:44 -04:00
Spencer Florence
6211f43b29 Fix display missing errors on travis 2015-04-29 08:57:58 -04:00
Matthew Flatt
e88c746c3c raco decompile: expose syntax info saved for REPL 2015-04-28 15:37:10 -06:00
Jay McCarthy
4418442d33 Merge pull request #3 from samth/fix-qp
Handle unexpected eof after =.
2015-04-10 16:29:15 -04:00
Jay McCarthy
81b74f9545 Merge pull request #2 from RenaissanceBug/rfc6265-docfix
Fix accidental dep on net-cookies package.
2015-04-10 07:23:37 -04:00
Sam Tobin-Hochstadt
a38834ebf2 Handle unexpected eof after =. 2015-04-09 13:48:10 -04:00
Jordan Johnson
83df895eb8 Fix accidental dep on net-cookies package. 2015-04-09 10:39:07 -07:00
Robby Findler
bdddd3c80d fix test case count reporting for the place case 2015-04-08 10:16:13 -05:00
Robby Findler
44260da512 fix test case count reporting for the separate processes case 2015-04-08 10:13:54 -05:00
Jay McCarthy
c239ef7327 Merge pull request #1 from RenaissanceBug/rfc6265-cookies
Note the deprecation of this code and point to the new and better RFC6265-compliant net-cookies package.
2015-04-05 08:16:27 -04:00
Jordan Johnson
b23108c4d4 Move 6265 code to separate pkg
* Move all the new cookie code to the net-cookies package
 * Update deprecation notice on net/cookie to point to that package
2015-04-04 14:02:23 -07:00
Jordan Johnson
c3ce72e229 Remove unused exn and example code
* Remove exn:fail:cookie, since I’d rewritten the library code to
avoid using it.
 * Correct docs for cookie-header->alist, to reflect not raising the
exn.
 * Remove needless illustration of date from clear-cookie-header
example.
2015-03-30 13:29:07 -07:00
Jordan Johnson
a01e93b515 Add new RFC6265-compliant cookies/ folder, modules, tests, docs.
* Add new modules, docs, and tests in cookies/
  * Server: parse Cookie header, make cookies, make Set-Cookie header
  * User agent:
   * parse Set-Cookie header
   * save cookies
   * make Cookie header
   * interface for substituting better cookie storage
  * Common functionality: validate cookie parts
 * Add deprecation notice to old cookie lib

Test and validation cleanup
2015-03-28 15:51:01 -07:00
Matthew Flatt
b5ab2b66d6 fix raco exe test
Fix the decision about whether "mzlib" will be found by only
setting the collection path in an executable. The old test
made sense only with the pre-repo-split organization.
2015-02-27 13:32:09 -07:00
Matthew Flatt
515b31ff44 decompile: allow collapsed module path to be relative 2015-02-27 11:23:46 -07:00
Matthew Flatt
047c8bd85a Rackety 2015-02-23 10:33:05 -07:00
Matthew Flatt
488fda33e4 document new options-put-port and options-impure-port 2015-02-19 10:39:30 -07:00
Matthew Flatt
f475997263 compiler/zo-marshal: repair for module language info
Same repair as commit bc6670c8e0 for the Racket core.
2015-02-09 17:53:27 -07:00
Matthew Flatt
ed15636bfc document net/unihead 2015-01-29 09:31:01 -07:00
Matthew Flatt
838a58ee84 decompile: adjust for change use toplevel map in lam 2015-01-19 21:29:23 -07:00
Jay McCarthy
0c96946bdd Removing out-dated WebSocket implementation 2015-01-14 14:27:23 -05:00
Sam Tobin-Hochstadt
fe132b0cb6 Install in installation mode to fix test. 2015-01-05 10:31:18 -05:00
Sam Tobin-Hochstadt
c12902b36e Try compiler tests with docker and NWU snapshot. 2015-01-05 09:15:39 -05:00
Matthew Flatt
e4af0cac26 compiler/zo-marshal: fix offsets in submodule search table 2015-01-03 09:58:08 -07:00
Sam Tobin-Hochstadt
f092262df7 Split zo file handling into its own package. 2014-12-16 22:10:52 -05:00
Sam Tobin-Hochstadt
678f0e9136 Use the version of this file that just moved into the core. 2014-12-15 02:51:04 -05:00
Matthew Flatt
81b8f8961b document and test #:method argument to http-client-recv! 2014-12-12 09:35:22 -07:00
Sam Tobin-Hochstadt
539c32205e Add travis build script. 2014-12-10 09:20:05 -05:00
Gustavo Massaccesi
9650129c86 repair decompiler to properly reflect the beg0 bytecode form
A single expression in `beg0` is never in tail position, unlike
a single expression within `begin0`.
2014-12-08 09:24:39 -07:00
Sam Tobin-Hochstadt
acc484f146 Add standard .gitignore file. 2014-12-06 17:46:37 -05:00
Sam Tobin-Hochstadt
b579bda4b3 Add standard .gitignore file. 2014-12-06 17:46:31 -05:00
Sam Tobin-Hochstadt
49ccf968d0 Remove extra directories. 2014-12-02 09:30:05 -05:00
Sam Tobin-Hochstadt
6d99e5b268 Remove extra directories. 2014-12-02 00:13:32 -05:00
Sam Tobin-Hochstadt
7678d59f14 Remove stray reference to Racket in LICENSE files.
Related to PR 14842.

original commit: 3bbdd134b1
2014-11-25 14:09:57 -05:00
Sam Tobin-Hochstadt
7767fe730d Remove stray reference to Racket in LICENSE files.
Related to PR 14842.

original commit: 3bbdd134b1
2014-11-25 14:09:57 -05:00
Matthew Flatt
fdd9631304 net/git-checkout: finish support for "dumb" HTTP(S)
Full dumb-server support is even more useful for testing.

original commit: 37a209b60e
2014-11-23 06:31:01 -07:00
Matthew Flatt
1aee96df7d net/git-checkout: support "dumb" protocol for discovery
Supporting just reference discovery can be useful for certain
testing configurations.

original commit: 04f5fe3815
2014-11-23 06:31:01 -07:00
Matthew Flatt
b46e39d5eb move raco make test to a more sensible place
original commit: 28b98beb6c
2014-11-09 08:47:18 -07:00
Matthew Flatt
6e62de29ed compiler/zo-marshal: allow extflonum literals
original commit: 201a5f0e6f
2014-10-27 20:01:38 -06:00
Kat Lyons
72864cdd93 Fix documentation error in net/sendurl
original commit: f54ea70ae0
2014-10-21 10:17:45 -06:00
Matthew Flatt
eb10901579 raco test: show more of stderr on failure
original commit: 66729a4473
2014-10-21 07:31:07 -05:00
Matthew Flatt
d4adf3db45 raco test: fix -l
original commit: 53cbb8b03a
2014-10-21 07:31:07 -05:00
Asumu Takikawa
b42b058941 Typo fixes in docs
original commit: d486fa1839
2014-10-20 02:54:03 -04:00
Matthew Flatt
7e762b6694 net/git-checkout: repairs for HTTP(S)
Declare a "git" user agent, and use a secure client context for HTTPS
unless the `GIT_SSL_NO_VERIFY` environment variable is defined.

original commit: ecc1d5dff2
2014-10-18 07:14:50 -05:00
Matthew Flatt
97281eddc6 net/git-checkout: support ref -> ID mapping without download
original commit: 06803e4da7
2014-10-18 07:14:50 -05:00
Matthew Flatt
643fcd20e1 net/git-checkout: support the smart HTTP(S) transport
Git-based hosting services most commonly support the smart HTTPS
protocol, which carries "git://"-format payload in a fairly straightforward
way. (Supporting the dumb protocol looks much more difficult.)

original commit: bbf154ba36
2014-10-18 07:14:50 -05:00
Matthew Flatt
dc696a2385 net/git-checkout: checkout a tree via the "git://" protocol
The `net/git-checkout` library implements enough of `git clone` to
extract a tree from a repository that is accessed via the "git://"
protocol. It doesn't preserve a local clone, and it attempts to
download only the slice of the repository that is needed for the
requested tree (depending on how the tree is referenced).

original commit: babd420293
2014-10-18 07:14:50 -05:00
Robby Findler
fefa1c520a update dns tests based on change at nwu
original commit: ad8b487712
2014-08-21 08:51:26 -05:00
Matthew Flatt
7b7e158b5a add update-implies to package "info.rkt"s
original commit: eb9cbe20bf
2014-08-14 16:49:53 +01:00
Matthew Flatt
8f1553919f add update-implies to package "info.rkt"s
original commit: eb9cbe20bf
2014-08-14 16:49:53 +01:00
Matthew Flatt
02f968085e net/http-client: don't send a 0-sized chunk that isn't a terminator
original commit: 682c92554f
2014-07-24 16:40:34 +01:00
Scott Bell
33cbe67156 Send a final, empty chunk as required by RFC 2616 in http-conn-send!
original commit: 29922c8a77
2014-07-24 16:39:41 +01:00
Matthew Flatt
8353db2882 raco decompile: show provides
original commit: bf748a03c9
2014-07-23 16:46:51 +01:00
Matthew Flatt
f567fe3589 fix a test for raco exe
The test failed for certain installation configurations due to a
problem with the test.

original commit: a881e24d43
2014-07-23 07:55:17 +01:00
Matthew Flatt
8191f8b7ad net/http-client: adjust data-procedure/c contract
Promise more (a `void?` result) and requies less (`any` instead of `any/c`).

original commit: 4aa61744c6
2014-07-11 06:21:33 +01:00
Scott Bell
cb907d7eec Add documentation for data-procedure/c
(Style adjusted by Matthew.)

original commit: ddf0a334a8
2014-07-11 06:20:47 +01:00
Matthew Flatt
9ac14af3fc 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.

original commit: 7ccac3c054
2014-07-10 07:10:03 +01:00
Scott Bell
3b984b6566 Allow http-conn-send! to take a procedure as its #:data parameter
original commit: ec0468a1f1
2014-07-09 09:45:15 -04:00
Scott Bell
ab575666ce Add additional tests for HTTP PUT with request body content
original commit: 9bd23a8726
2014-07-09 09:45:15 -04:00
Scott Bell
d86f9cdc4c Make the HTTP request method and body explicit in http-client tests
original commit: 942459dcf1
2014-07-09 09:45:15 -04:00
Matthew Flatt
c66558badb raco setup / raco pkg install: add --fail-fast flag
This flag is useful for speculative package installations runs where
we'd like to give up and try something else if it's not working.
Specifically, we might try installing multiple packages at once,
and then back off to a smaller subset if something goes wrong.

original commit: d316652160
2014-07-02 09:07:36 +01:00
Matthew Flatt
0c9af219db raco test: add history note on --heartbeat
Should have been included with f3c8638366.

original commit: 2d3da47447
2014-06-30 10:17:03 +01:00
Matthew Flatt
60fe855cf7 raco test: add --heartbeat flag
Useful when running many tests in parallel to keep track of a test
that is running especially long (and maybe stuck).

original commit: f3c8638366
2014-06-17 07:17:16 +01:00
Matthew Flatt
52ac9d616e raco test: handling of spurious files
A `--drdr` run shouldn't stop because a discoevered file
disappears (such as one generated temporarily by a test).

Also, use new style for some errors.

original commit: 034acfa514
2014-06-17 07:17:16 +01:00
Matthew Flatt
eba91e16bd raco test: refine override-"info.rkt" behavior of specifying a file
In consultation with Jay, unify the ignore-file's-extension and
ignore-"info.rkt"-disabling treatment of `raco test` arguments.
The change is that the latter applies only when an argument is a
file, and not when it's a directory.

original commit: 1715a50c80
2014-06-03 11:59:30 +01:00
Matthew Flatt
9e0e4327f1 raco test: continue when checking for submodules fails
original commit: 94a5b02886
2014-06-03 09:59:43 +01:00
Matthew Flatt
7117fd4e2c raco test: fix --process without --fresh-user
original commit: 85c8f271cb
2014-06-03 09:20:17 +01:00
Matthew Flatt
4e8f41dcaf raco exe: adjust tests to avoid "stdout" in source directory
original commit: 0b5fbc17c9
2014-06-03 09:09:13 +01:00
Matthew Flatt
7380ec5e0e raco test: add ++ignore-stderr <pattern> option
I'm using this option to ignore "Xlib: extension \"RANDR\" missing"
warnings.

original commit: a011f9b816
2014-06-03 08:31:01 +01:00
Matthew Flatt
9f37438fe0 raco test: create fresh user directory for each test in DrDr mode
original commit: 2d3b856b71
2014-06-03 07:40:05 +01:00
Jay McCarthy
fce59c1521 Ensure that explicit arguments are always run even when ignored by info.rkt
original commit: 4b1cb56b99
2014-06-02 18:31:30 -06:00
Matthew Flatt
4381f1eb24 raco decompile: fix for bytecode without source
original commit: 3f75bc21d9
2014-06-02 20:40:24 +01:00
Matthew Flatt
e1814d5686 net/url: add relative-path->relative-url-string
original commit: e27c51698b
2014-06-02 14:34:22 +01:00
Matthew Flatt
7fdf264e1d raco {make,decompile}: fix bytecode path calculation
Use `compiler/compilation-path` to take into account PLTCOMPILEDROOTS, etc.

Closes PR 14525

original commit: 5ad11c85e6
2014-05-27 09:27:15 +01:00
Matthew Flatt
979299850e raco decompile: improve argument checking and reporting
Relevant to PR 14525

original commit: e4189afb15
2014-05-27 07:17:11 +01:00
Matthew Flatt
03a0dbd9fd raco make: improve parallelism
The `require` macro now logs "prefetch" messages when it sees a `require`
with multiple module paths. The prefix information is approximate, since
parsing a `require` subform might depend on imports from a previous subform,
but in the common case, there are many obvious module paths to prefetch.

The parallel mode of `raco make` watches for prefetch messages and
records the suggested "prefetch" paths so they can be compiled by other
processes.

original commit: 9e3b984463
2014-05-26 18:56:50 +01:00
Matthew Flatt
1e1d92d311 net/sendurl: improve docs on encoding in send-url and other functions
original commit: 6d572864d2
2014-05-11 08:35:43 -06:00
Robby Findler
633ec1faf5 fix raco test -c
closes PR 14494

original commit: fa68b57de3
2014-05-10 11:12:22 -05:00
Matthew Flatt
38f585181e raco dist: preserve relative location of runtime files only within a package
Previously, relative locations were preserved for all files with the same
root, but that tends to keep too much information about the original
filesystem layout, especially when runtime files are pulled both from
the installation and a user-specific area. Since packages can be installed
at different relative locations, it makes sense to preserve relative
locations only up to package boundaries.

original commit: 5c909cca0d
2014-04-30 14:59:16 -06:00
Sam Tobin-Hochstadt
79a884aa43 Add -l flag to raco test.
Behaves similarly to `-l` for plain `racket`.

original commit: cff3c41e01
2014-04-23 17:52:33 -04:00
Jay McCarthy
7d7c7eac78 fix pr14460
original commit: 015cf1b74f
2014-04-21 15:27:39 -06:00
Jay McCarthy
6762c6105a Add FAQ section
original commit: 004957bcd6
2014-04-16 12:30:11 -06:00
Matthew Flatt
90f45301b8 raco decompile: fix for #%foreign
Merge to v6.0.1

original commit: e9b97c494c
2014-04-08 10:22:47 -06:00
Robby Findler
0de368db23 adjust the dns tests so they stop failing
also, remove eli-tester use since I got bit, yet one more time,
by the "syntax error on both sides of the => implies the test case
passes" behavior.

original commit: 3b030e393d
2014-04-03 11:35:59 -05:00
Matthew Flatt
4f0c0ad3df create-embedding-executable: fix namespace and module-declaration problem
original commit: 8253994434
2014-03-09 08:44:53 -06:00
Matthew Flatt
7824b84d6c LGPL by reference
original commit: 981701d237
2014-02-27 15:56:11 -07:00
Matthew Flatt
7faccf058a LGPL by reference
original commit: 981701d237
2014-02-27 15:56:11 -07:00
Matthew Flatt
ec06cc8428 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`.

original commit: e4ce0d0331
2014-02-25 16:01:44 -07:00
Eli Barzilay
b0dbcfeb31 2013 -> 2014
original commit: c61a549840
2014-01-21 15:02:21 -05:00
Eli Barzilay
6aec40ebfb 2013 -> 2014
original commit: c61a549840
2014-01-21 15:02:21 -05:00
Eric Dobson
c6e34673ee Make parallel compile not call exit.
Closes PR 13373.

original commit: f0ebfee9ac
2014-01-13 09:34:40 -08:00
Vincent St-Amour
02cafbccb6 Fix raco test on relative paths.
original commit: 3a025efcce
2014-01-06 18:00:29 -05:00
Matthew Flatt
3effe69d78 copy drdr:random command props to test configs
original commit: 48a85125da
2014-01-01 08:21:31 -07:00
Matthew Flatt
a536f2adeb copy responsible info to "info.rkt" files
It seems more ideal that `pkg-authors` would be specific enough
responsibility, but our existing allocations of responsibility are
more fine-grained, and we keep them for now.

original commit: 19f8f30f63
2014-01-01 07:27:15 -07:00
Matthew Flatt
049bf5d3b1 copy responsible info to "info.rkt" files
It seems more ideal that `pkg-authors` would be specific enough
responsibility, but our existing allocations of responsibility are
more fine-grained, and we keep them for now.

original commit: 19f8f30f63
2014-01-01 07:27:15 -07:00
Matthew Flatt
16509fa8e8 raco test: responsible-party and varying-party logging, lock names
The responsible party for a test defaults to the enclosing package's
author.

Also, add support for a `test-timeouts` fallback in "info.rkt".

original commit: 59cbefe47a
2014-01-01 07:27:15 -07:00
Matthew Flatt
8453e44798 raco test: add -m/--modules flag, exit code 2 for timeout
Treats file arguments the same as a file in a directory, package,
or collection.

If any test fails due to a timeout, the exit code is 2 (instead
of 1 for only non-timeout failures or 0 for only success).

original commit: bce27aa387
2013-12-30 17:32:06 -07:00
Matthew Flatt
29369130ed move "props" test configs to test submodules or "info.rkt" files
The "props" file still has

 * ".rkt" `drdr:timeout` entries, needed until DrDr uses submodules and
   "info.rkt" files; although timeout information has been put in
   submodules for `raco test`, DrDr uses `raco test` in a way that does not
   enable timeouts, so that DrDr can implement timeouts itself (and record
   when a test times out)

 * ".rkt" `drdr:random #t` entries; not sure what to do with these, yet

 * ".rkt" `responsible` entries; not sure what to do with these, yet

 * ".rktl" `drdr:command-line #f` entries, needed until all ".rktl" files
   are disabled in DrDr

The following files were previously disabled for DrDr testing, but were
intentionally left as enabled with these changes:

pkgs/racket-pkgs/racket-test/tests/pkg/shelly.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/info.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/basic-index.rkt
pkgs/racket-pkgs/racket-test/tests/racket/link.rkt
pkgs/racket-pkgs/racket-test/tests/racket/embed-in-c.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/use-c-printf.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/c-printf.rkt
pkgs/parser-tools-pkgs/parser-tools-lib/parser-tools/private-lex/error-tests.rkt
pkgs/mysterx/mysterx.rkt
pkgs/mysterx/main.rkt
pkgs/games/gobblet/test-model.rkt
pkgs/games/gobblet/test-explore.rkt
pkgs/games/gobblet/robot.rkt
pkgs/games/gobblet/check.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/main.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/ffi.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/dbsystem.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/connection.rkt
pkgs/distributed-places-pkgs/distributed-places-lib/racket/place/distributed/examples/hello-world.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/htdp-pkgs/htdp-test/2htdp/utest/balls.rkt
pkgs/gui-pkgs/gui-test/framework/tests/test-suite-utils.rkt
pkgs/games/paint-by-numbers/raw-problems/size-calculation.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
pkgs/compatibility-pkgs/compatibility-lib/mzlib/traceld.rkt
pkgs/cext-lib/dynext/private/stdio.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
racket/collects/ffi/unsafe/objc.rkt
racket/collects/ffi/objc.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/tests-db.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-docs.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-catalogs-api.rkt
pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/redextomatrix.rkt
pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt
pkgs/planet-pkgs/planet-test/tests/planet/version.rkt
pkgs/planet-pkgs/planet-test/tests/planet/test-docs-complete.rkt
pkgs/planet-pkgs/planet-test/tests/planet/lang.rkt
pkgs/planet-pkgs/planet-test/tests/planet/docs-build.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/follow-log.rkt
pkgs/drracket-pkgs/drracket/drracket/private/dock-icon.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/tool-lib-and-sig.rkt

original commit: e226ad66c5
2013-12-30 12:15:18 -07:00
Matthew Flatt
b29b18178b raco test: fix error summary in direct mode
Also, fix a doc typo

original commit: 58d425c00c
2013-12-30 12:15:18 -07:00
Matthew Flatt
51e419cfc2 raco test: run ".scrbl" files by default; check cmdline args for all files
To test a file that ends in".ss", ".scm", etc., add a
`test-command-line-arguments` entry to an "info.rkt" file.

original commit: e44b15c032
2013-12-30 12:15:18 -07:00
Matthew Flatt
74702c1f94 move "props" test configs to test submodules or "info.rkt" files
The "props" file still has

 * ".rkt" `drdr:timeout` entries, needed until DrDr uses submodules and
   "info.rkt" files; although timeout information has been put in
   submodules for `raco test`, DrDr uses `raco test` in a way that does not
   enable timeouts, so that DrDr can implement timeouts itself (and record
   when a test times out)

 * ".rkt" `drdr:random #t` entries; not sure what to do with these, yet

 * ".rkt" `responsible` entries; not sure what to do with these, yet

 * ".rktl" `drdr:command-line #f` entries, needed until all ".rktl" files
   are disabled in DrDr

The following files were previously disabled for DrDr testing, but were
intentionally left as enabled with these changes:

pkgs/racket-pkgs/racket-test/tests/pkg/shelly.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/info.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/basic-index.rkt
pkgs/racket-pkgs/racket-test/tests/racket/link.rkt
pkgs/racket-pkgs/racket-test/tests/racket/embed-in-c.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/use-c-printf.rkt
pkgs/racket-pkgs/racket-doc/ffi/examples/c-printf.rkt
pkgs/parser-tools-pkgs/parser-tools-lib/parser-tools/private-lex/error-tests.rkt
pkgs/mysterx/mysterx.rkt
pkgs/mysterx/main.rkt
pkgs/games/gobblet/test-model.rkt
pkgs/games/gobblet/test-explore.rkt
pkgs/games/gobblet/robot.rkt
pkgs/games/gobblet/check.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/main.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/ffi.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/dbsystem.rkt
pkgs/db-pkgs/db-lib/db/private/odbc/connection.rkt
pkgs/distributed-places-pkgs/distributed-places-lib/racket/place/distributed/examples/hello-world.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt
pkgs/htdp-pkgs/htdp-test/2htdp/utest/balls.rkt
pkgs/gui-pkgs/gui-test/framework/tests/test-suite-utils.rkt
pkgs/games/paint-by-numbers/raw-problems/size-calculation.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
pkgs/compatibility-pkgs/compatibility-lib/mzlib/traceld.rkt
pkgs/cext-lib/dynext/private/stdio.rkt
pkgs/db-pkgs/db-lib/db/odbc.rkt
racket/collects/ffi/unsafe/objc.rkt
racket/collects/ffi/objc.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/tests-db.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-docs.rkt
pkgs/racket-pkgs/racket-test/tests/pkg/test-catalogs-api.rkt
pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt
pkgs/redex-pkgs/redex-lib/redex/private/compiler/redextomatrix.rkt
pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt
pkgs/planet-pkgs/planet-test/tests/planet/version.rkt
pkgs/planet-pkgs/planet-test/tests/planet/test-docs-complete.rkt
pkgs/planet-pkgs/planet-test/tests/planet/lang.rkt
pkgs/planet-pkgs/planet-test/tests/planet/docs-build.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/follow-log.rkt
pkgs/drracket-pkgs/drracket/drracket/private/dock-icon.rkt
pkgs/drracket-pkgs/drracket-test/tests/drracket/tool-lib-and-sig.rkt

original commit: e226ad66c5
2013-12-30 12:15:18 -07:00
Matthew Flatt
ba1038998f raco test: use executable-yield-handler before exit
original commit: 4a19403288
2013-12-30 12:13:57 -07:00
Matthew Flatt
65ece182a7 raco test: add test-command-line-arguments field for "info.rkt"
Also, make `--drdr` timeout 90 seconds instead of 600.

original commit: f830768c37
2013-12-30 12:13:57 -07:00
Matthew Flatt
7ff04c1dfa raco test: fix process command-line handling and adjust timeout handling
original commit: bbb0c5f6e9
2013-12-29 09:40:22 -06:00
Matthew Flatt
11c41cb89b raco test: add "info.rkt" field test-omit-paths
Using an "info.rkt" field is a fallback for when a submodule
won't do (e.g., because the module doesn't normally compile).

original commit: 81a03d59de
2013-12-29 08:35:21 -06:00
Matthew Flatt
48f4bed9aa raco test: default mode more like before
By default, a single file runs directly, instead of in a subprocess,
and stderr is not checked. That's both more in line with the old
behavior and more suitable for DrDr's use in running an individual
test.

Also, get rid of the `drdr` submodule, which doesn't look like a good
idea anymore.

original commit: 3b3c3726ba
2013-12-29 06:40:15 -06:00
Matthew Flatt
92481e65d3 raco test: add DrDr-like modes
Run tests in separate processes, support tests in
parallel, flag tests with non-zero exit codes or
stderr output as failing, add timeout support, etc.

Use the `--drdr` flag as a shorthand for DrDr-like flags.
The `--drdr` flag causes `raco test` to check for a `drdr`
submodule, then a `test` submodule, then run the module
directly. (The idea is that DrDr will eventualy try the
same sequence.) A test can declare an alternate timeout
through a `config` sub-submodule (and the idea is that
"props" will go away).

original commit: 0db19423b4
2013-12-28 19:55:31 -06:00
Jay McCarthy
d7bf6b1971 Fix test cases for close?
original commit: 4dd594a291
2013-12-18 12:03:52 -07:00
Jay McCarthy
15802ad775 Fix PR14247
Add "Connection: close" to requests that we know will end after one
request.

Read upto 1K bytes at a time on requests rather than just 1 at a time.

Change closing semantics to be "close" and not "abandon"

original commit: 87135b110b
2013-12-14 08:00:41 -07:00
Matthew Flatt
f9487b6168 net/http-client: fix http-conn-live? result
Merge to v6.0

original commit: 1f6453de89
2013-12-06 21:19:38 -07:00
Matthew Flatt
9101bccd5b raco exe: suppress expected stderr output
Merge to v6.0

original commit: fd2da02029
2013-11-30 08:08:22 -07:00
Matthew Flatt
88c3578e52 raco exe: add --config-path option, default to "etc"
Make executables created by `raco exe` not refer to the original
configuration directory by default, but add an option for setting
the directory.

For Unix ELF executables, fix `raco exe` to set/preserve the
configuration directory.

Merge to v6.0

original commit: 33b7d49b2e
2013-11-29 13:13:25 -07:00
Asumu Takikawa
784ab3a94d Remove/replace some dependencies on scheme-lib
original commit: dfe51373dd
2013-11-27 00:38:52 -05:00
Jay McCarthy
6ac10d087a Adding user-agent as some services require
original commit: 8ca8764bb3
2013-11-26 08:57:56 -07:00
Jay McCarthy
b94fd95bbf Continue fixing PR14175 by looking at all links files
original commit: 8e2622857f
2013-11-19 14:20:59 -07:00
Jay McCarthy
f35ba28b1f Fix PR14175
original commit: 80ba30eaab
2013-11-19 13:22:48 -07:00
Robby Findler
58eddf2373 adjust test for moved file
original commit: 052dbb32d1
2013-11-09 18:25:28 -06:00
Matthew Flatt
758ee94a41 "racket-test" clean-up
Move a few tests, and clear out a lot of junk.

original commit: 29a0c44c98
2013-11-09 08:30:37 -07:00
Matthew Flatt
7d24faace5 "racket-test" clean-up
Move a few tests, and clear out a lot of junk.

original commit: 29a0c44c98
2013-11-09 08:30:37 -07:00
Matthew Flatt
15430e3fce move raco exe tests to the compiler-test package
Also, enable the `raco exe` tests for DrDr

original commit: 0bc89dc641
2013-11-08 18:13:43 -07:00
Matthew Flatt
d0d458e1a3 raco exe: fix problem with dynamically resolved relative submodules
original commit: 846c247aa3
2013-11-08 18:13:43 -07:00
Matthew Flatt
dfa0381b92 raco expand & decompile: add --columns option
original commit: 9b04d516ba
2013-11-07 13:52:38 -07:00
Jay McCarthy
444cabd8c8 Fix PR14142 by allowing 'tolerant' line endings acording to Appendix B of the HTTP spec
original commit: 3d15fb3c1d
2013-11-05 11:03:06 -07:00
Jay McCarthy
d90a7c4e47 Fix PR 14140
original commit: b61198ec3f
2013-11-04 15:50:03 -07:00
Robby Findler
331b6a99cd fix a use of collection-path
original commit: 86d9a2fff2
2013-11-02 21:32:17 -05:00
Matthew Flatt
afe7f46d35 move some test & doc collections out of "racket-" pkgs to new pkgs
original commit: 1920ac59ab
2013-10-15 17:50:32 -06:00
Matthew Flatt
e1bb8f5d6c move some test & doc collections out of "racket-" pkgs to new pkgs
original commit: 1920ac59ab
2013-10-15 17:50:32 -06:00
Jay McCarthy
7ce8c7c434 Racket now works, but was broken before
original commit: 11b784236e
2013-10-15 10:38:26 -06:00
Jay McCarthy
103cb2bfa6 Restoring old decoding behavior of net/url and allowing future compatibility by parameterizing what is accepted
original commit: 0a336024a9
2013-10-15 10:38:26 -06:00
Jay McCarthy
0a855e73cf Base now works, but was broken before
original commit: e6e95f1029
2013-10-15 10:38:26 -06:00
Jay McCarthy
6f1faa8e8f Fixing PR14098
original commit: f8d3d6c81b
2013-10-15 10:38:26 -06:00
Jay McCarthy
8eae769bd1 Including test from PR14064
original commit: 4ff41fdea2
2013-10-11 16:37:23 -06:00
Matthew Flatt
6ebcb502de 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

original commit: 70b6f6464f
2013-10-09 07:09:36 -06:00
Sam Tobin-Hochstadt
007d3fe205 Remove units in parts of compiler, dynext, setup and create the cext-lib package.
`cext-lib` contains much of the contents of `dynext`, which
is no longer very widely used.

Also moved the implementation of the `mzc` executable
to a more appropriate package.

Also, used `lazy-require` consistently for dynamically
loading implementations.

original commit: 9f2755116d
2013-09-26 14:53:51 -04:00
Robby Findler
635d79c7c3 bring dns tests up to date with what appears to be reality
original commit: f8860b5e05
2013-09-15 07:39:10 -05:00
Matthew Flatt
1c9e007ae1 repair for uri-decode
Certain inputs could cause `uri-decode` to go into a loop.

Patch and supplied by Doug Williams.

Closes PR 14010

original commit: 24fc16674b
2013-09-10 07:51:31 -06:00
Jay McCarthy
8fed20859a Support gzip encoded HTTP responses
original commit: 5a7ce6d60a
2013-09-04 09:05:09 -06:00
Matthew Flatt
b3553a342f move stray rackunit module
original commit: a30d80a9c4
2013-09-02 10:10:31 -06:00
Matthew Flatt
f81a9a5cac include license with each package
original commit: ff9da94cfb
2013-08-31 06:25:31 -06:00
Matthew Flatt
181c8ea6df include license with each package
original commit: ff9da94cfb
2013-08-31 06:25:31 -06:00
Matthew Flatt
b4613332a3 net/url: fix problems with new implementation on net/http-client
Various `net/url` operations need to request a close of the
connection after the operation completes, and `het/http-client`
needs to actually close the input-port half of a connection.

Also, add `http-conn-abandon!`.

Also also, add limits on internal pipes, so that data doesn't pile
up in a connection-processing thread, and fix POST/PUT by adding
a needed CRLF after posted data.

original commit: 0dcaa5e19f
2013-08-30 10:37:09 -06:00
Carl Eastlund
0203850c3c Changed set? to generic-set?.
original commit: 6665f42e33
2013-08-28 00:10:18 -04:00
Matthew Flatt
8dfb089fc2 auto-fix dependencies for "scheme-lib" and "srfi-lite-lib"
original commit: c709af5bf4
2013-08-27 15:20:58 -06:00
Matthew Flatt
b51a206bf5 auto-fix dependencies for "scheme-lib" and "srfi-lite-lib"
original commit: c709af5bf4
2013-08-27 15:20:58 -06:00
Matthew Flatt
ae6ce5f2fa 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.

original commit: d175c3949c
2013-08-27 15:19:24 -06:00
Jay McCarthy
15ff40050c Clarify http request support
original commit: 740a92164c
2013-08-27 09:16:16 -06:00
Jay McCarthy
efb0be60c8 Allow different HTTP versions
original commit: 41901397a7
2013-08-27 09:16:16 -06:00
Jay McCarthy
eb09070c98 Parse HTTP responses more generously
original commit: fbccbd8ad3
2013-08-27 09:16:15 -06:00
Matthew Flatt
4acbf22ae9 fix `{put,head}-[im]pure-port'
Connection wasn't converted to a port, and included a repeated
layer of chunk decoding.

original commit: 100cc0f84e
2013-08-24 15:21:06 -06:00
Jay McCarthy
6b5cd82d29 Adding net/http-client and using it underneath net/url
original commit: e8bafbd9b9
2013-08-23 12:41:37 -06:00
Jay McCarthy
c447b25384 Speed up test
original commit: 7d0471cd8d
2013-08-23 12:41:37 -06:00
Matthew Flatt
2214acbb94 net/win32-ssl: a native Windows SSL layer
This implementation of SSL ports is less complete than `openssl', but
it's complete enough to drive HTTPS, and so it can be used to download
a package that provides the DLLs needed for the `openssl' library.

The `net/url' library uses `net/win32-ssl' on Windows when `openssl'
is not available (due to the absence of the OpenSSL DLLs).

original commit: d9e226824f
2013-08-18 10:57:04 -06:00
Matthew Flatt
be324be798 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.

original commit: 58c0074a71
2013-08-10 12:52:17 -06:00
Matthew Flatt
377b06a352 adjust `compiler/zo-marshal' for bytecode-file change
Forgot to fix as part of b8db5aacb3.

original commit: 3b76628eb1
2013-08-07 08:41:43 -07:00
Matthew Flatt
3e1e9a6357 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.

original commit: b8db5aacb3
2013-08-07 08:37:50 -07:00
Matthew Flatt
3a67e505ba fix some tests that need to find `racket'
original commit: 4492cf2555
2013-08-02 14:22:28 -06:00
Matthew Flatt
b67856a397 add pkg-desc' and pkg-authors' to each package
This information will be used to construct a catalog from the
package directories.

original commit: 057bfc2ea1
2013-07-31 07:06:24 -06:00
Matthew Flatt
b7f32c3cf3 add pkg-desc' and pkg-authors' to each package
This information will be used to construct a catalog from the
package directories.

original commit: 057bfc2ea1
2013-07-31 07:06:24 -06:00
Matthew Flatt
05a7459d8e fix some tests
original commit: 1708fb43b4
2013-07-21 19:55:10 -06:00
Matthew Flatt
7ef3b0c72a 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.

original commit: 67a9889ef7
2013-07-19 11:52:02 -06:00
Matthew Flatt
47148430d2 enable compilation of tests formerly in "racket-test"; reorganize
A package like "gui" does not depend on a package like "gui-test",
which means that you have to specifically ask for a test package if
you want the tests. A new "main-distribution-test" package
aggregates the tests for packages that are in "main-distribution".

The "plt-services" package, meanwhile, depends on the
"main-distribution-test" package, which means that all tests are
compiled by default for an in-place build.

original commit: d50d0f8bca
2013-07-16 18:45:05 -06:00
Matthew Flatt
7864208102 reduce doc dependencies of "racket-doc"
original commit: 72ae9a1249
2013-07-12 14:52:43 -06:00
Eli Barzilay
883be71ec5 Add missing test.
(...which was tested accidentally in the url tests.)

original commit: 28fc893c70
2013-07-06 23:39:23 -04:00
Eli Barzilay
0c73551845 Avoid duplicating code in test files.
original commit: 62fc516c24
2013-07-06 23:38:33 -04:00
Sam Tobin-Hochstadt
fbb5723ba3 Run the net tests under raco test.
original commit: 5e8a9780e8
2013-07-06 10:26:56 -04:00
Eli Barzilay
f92a8c4e45 Further explain silent acceptance of unencoded characters.
Also highlight the two tests that use that.

original commit: 8d55b892ec
2013-07-05 20:20:49 -04:00
Sam Tobin-Hochstadt
5a758b6ecc Use #lang info instead of #lang setup/infotab.
original commit: 5a7ca7ebb5
2013-07-04 16:46:32 -04:00
Sam Tobin-Hochstadt
ff56800079 Use #lang info instead of #lang setup/infotab.
original commit: 5a7ca7ebb5
2013-07-04 16:46:32 -04:00
Matthew Flatt
b63d902657 make packages single-collection by default
The `single-collection' "info.rkt" definition is no longer supported.

original commit: aabbfdc3d5
2013-07-03 19:49:06 -06:00
Sam Tobin-Hochstadt
4ebcdce773 Move most of the compiler collection to compiler-lib.
original commit: 3ad009070e
2013-07-01 12:08:42 -04:00
Sam Tobin-Hochstadt
1c93e0f023 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.

original commit: d54c1e4e49
2013-07-01 12:08:42 -04:00
Sam Tobin-Hochstadt
e6275c3b69 Move most of the net collection out of the core.
- Most units and signatures from the `net` collection
  are now in `compatibility-lib`.
- Most of the actual libraries are in the `net-lib`
  package.

original commit: 2b1fb036c6
2013-07-01 11:27:14 -04:00
Matthew Flatt
3ef406b5c6 auto-fix dependencies in "pkgs"
Left one dependency broken: "drracket" currently depends on "htdp" for
a test. That needs to be fixed by removing the dependency (moving the
test to "htdp?), instead of changing the declared dependencies.

original commit: 51290fd2a9
2013-06-29 06:51:19 -06:00
Matthew Flatt
a8b472d4c4 auto-fix dependencies in "pkgs"
Left one dependency broken: "drracket" currently depends on "htdp" for
a test. That needs to be fixed by removing the dependency (moving the
test to "htdp?), instead of changing the declared dependencies.

original commit: 51290fd2a9
2013-06-29 06:51:19 -06:00
Matthew Flatt
04efdd405d 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.

original commit: 04d5d9bd55
2013-06-29 06:51:18 -06:00
Sam Tobin-Hochstadt
986ec9297b Move much of mzlib to compatibility-lib package.
original commit: 7917f32d0c
2013-06-27 13:53:52 -04:00
Matthew Flatt
a62b3559de a step toward single-collection packages as default
A package's "info.rkt" file should define `collection' as a
string to name a single-collection package's collection, or as
the symbol 'multi to declare the package as multi-collection.
If `collection' is 'same-as-pkg, then the package name is used
as the collection name.

The default for `collection' is 'multi for now, but the intent
is to change the default to 'same-as-pkg after a conversion
period. Also, support for a `single-collection' definition remains
in place, but it wil be removed.

original commit: c738a6aa3e
2013-06-25 22:46:23 +02:00
Matthew Flatt
f2627708e9 a step toward single-collection packages as default
A package's "info.rkt" file should define `collection' as a
string to name a single-collection package's collection, or as
the symbol 'multi to declare the package as multi-collection.
If `collection' is 'same-as-pkg, then the package name is used
as the collection name.

The default for `collection' is 'multi for now, but the intent
is to change the default to 'same-as-pkg after a conversion
period. Also, support for a `single-collection' definition remains
in place, but it wil be removed.

original commit: c738a6aa3e
2013-06-25 22:46:23 +02:00
Matthew Flatt
81f9d66ca1 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.

original commit: b2ebb0a28b
2013-06-19 09:01:37 -06:00
Matthew Flatt
e828d319f8 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.

original commit: b2ebb0a28b
2013-06-19 09:01:37 -06:00
Kimball Germane
f4abd52fa7 Language-level demodularizer.
original commit: c9f4b96f88
2013-06-12 05:56:52 -06:00
Eli Barzilay
ea5ef3ff51 Misc improvements to `net/uri-codec'.
Fix a bug in encoding strings with characters between 128 and 256, avoid
extra bindings for conversion vectors; remove calling `noels-tests' from
`main' since it's already called from `tests', etc.

original commit: c2280ed8dc
2013-05-22 13:19:12 -04:00
Matthew Flatt
4cdad9dec2 raco pkg create: support "source" and "binary" bundling
Adds `--from-dir' and `--from-install' flags to select the interpretation
of the argument as a directory or as the name of an installed package.
Relevant to PR 13669

Adds `--as-is' (the default), `--source', and `--binary' flags to
select a pruning mode.

The `raco setup' tool recognizes a `rendered-scribblings' specification
in "info.rkt" to trigger moving rendered documentation into place,
registering its tags in the cross-reference database, and fixing up
references to "local-redirect.js"; the presence of a "synced.rktd"
indicates when those fixups have been performed (since, if the package
is installed in a user-specific scope, the documentation doesn't actually
move anywhere). Finally, "out<n>.sxref" needs to report paths relative to
the documentation's directory, and then the relative-directory references
need to be suitably resolved at derserialization; some support for such
relative paths was in place, but it wasn't quite general enough before.

original commit: 198a65a5fc
2013-05-16 11:50:04 -06:00
Matthew Flatt
71a343ca03 raco pkg create: support "source" and "binary" bundling
Adds `--from-dir' and `--from-install' flags to select the interpretation
of the argument as a directory or as the name of an installed package.
Relevant to PR 13669

Adds `--as-is' (the default), `--source', and `--binary' flags to
select a pruning mode.

The `raco setup' tool recognizes a `rendered-scribblings' specification
in "info.rkt" to trigger moving rendered documentation into place,
registering its tags in the cross-reference database, and fixing up
references to "local-redirect.js"; the presence of a "synced.rktd"
indicates when those fixups have been performed (since, if the package
is installed in a user-specific scope, the documentation doesn't actually
move anywhere). Finally, "out<n>.sxref" needs to report paths relative to
the documentation's directory, and then the relative-directory references
need to be suitably resolved at derserialization; some support for such
relative paths was in place, but it wasn't quite general enough before.

original commit: 198a65a5fc
2013-05-16 11:50:04 -06:00
Matthew Flatt
2837513428 fix `raco exe' test
original commit: b3e2d35be9
2013-05-08 12:31:34 -04:00
Matthew Flatt
8254cd3d98 add `configure-runtime' submodule support
A language can now introduce a `configure-runtime' submodule that
is `dynamic-require'd before the enclosing module.

This new submodule protocol provides a more general and
easier-to-understand way of configuring the run-time environment for
a module's language, as compared to the `module->language-info'
path (through a `get-info' function, via a 'configure-runtime value,
and finally loading the specified module).

The `module->language-info' path remains in place, and it is
checked after a `configure-runtime' submodule is run, since
that order is likely to be the most backward compatible.

original commit: 27f1b39294
2013-05-07 08:31:16 -04:00
Jay McCarthy
04d012960f Fixing PR13729
original commit: 7afde31fa6
2013-05-06 07:23:08 -06:00
Matthew Flatt
0416b4a5ff raco setup: allow foreign-lib and man-page installation
This change hopefully fills out the things that a distribution
can do and that packages should be able to extend.

original commit: 03b35cd846
2013-05-03 09:13:41 -06:00
Jay McCarthy
bd9cf60613 Adding summary mode, quiet program mode and changing tests/eli-tester to cooperate so it adds useful information in summary mode
original commit: ccf1119b68
2013-05-02 14:49:58 -06:00
Matthew Flatt
072bc1110c raco setup: add --doc-index; raco pkg: use --doc-index
This combination of changes moves the decision about rebuilding
"scribblings/main" and "scribblings/main/user" to `raco setup',
which is in a better position to know whether documentation should
be built at all.

original commit: 413ca68435
2013-05-02 12:18:40 -06:00
Greg Hendershott
7b40eb66b7 Add optional message flags argument to imap-append.
Previously this was hard-coded to use the \Seen flag. Now that's the
default value when the argument is not supplied.

original commit: c6e2843557
2013-04-23 15:49:22 -06:00
Eli Barzilay
45310eee82 raco test: make -r' and -x' mutually exclusive.
original commit: 02d7f58cc1
2013-04-20 02:04:42 -04:00
Matthew Flatt
58ce10c2ee demote some `raco' commands
The commands `link', `pack', and `unpack' are now
discouraged in favor of `pkg'.

original commit: 3e1ecc41b4
2013-04-17 12:28:50 -06:00
Matthew Flatt
cdbe3e0aaf raco setup: --tidy mode (as needed by `raco pkg remove') and more
When a collection disappears, then documentation and metadata
cross-references need fixing up based on everything that remains
available, even though other setup actions are confined to
collections that are specifically relevant to the packages. The
new `--tidy' mode takes care of that.

Package installation now also provides `--avoid-main' when working
with packages in a scope other than installation scope, and `raco
setup' now better respects `--avoid-main' to avoid creating
executables or re-running documentation.

Also, revise the `raco' documentation to better orient it toward the
package manager.

original commit: 51d48f3ab4
2013-04-17 12:28:50 -06:00
Matthew Flatt
4af90112d0 pkg/lib: lock clean-up, and add `path->pkg'
Make the installed-package database lock reentrant, change some
functions to take the lock, and fix the documentation on when a
lock is expected to be taken outside of functions.

original commit: 10e53e3bf4
2013-04-16 08:58:19 -06:00
Matthew Flatt
77833ba35b pkg/lib: clean up names and package-scope parameter
More consistent exported names and parameters that better match the
three scope choices (installation, user, or shared) --- cleaning up
after myself.

original commit: 267ac03279
2013-04-16 08:58:19 -06:00
Asumu Takikawa
d9ee32c7f3 Fix old style contracts
original commit: d4927e917b
2013-04-16 10:52:55 -04:00
Asumu Takikawa
0e41a56b70 Fix imap-list-child-mailboxes to match contract
Closes PR 13658

original commit: 7d4b162181
2013-04-16 10:52:55 -04:00
Asumu Takikawa
0d0c10d9c4 Fix parsing when CNAME is provided for MX query
The code was assuming that the record type was
MX even though this could be false. Also adjusted
some code to also make it easier to test.

Note: the behavior when MX records are missing
is probably still not right.

Closes PR 13654

original commit: c7d878c009
2013-04-16 10:52:55 -04:00
Matthew Flatt
e37893aa04 net/url: support HTTP/1.1 connections
original commit: 50ade25b28
2013-04-15 06:21:49 -06:00
Asumu Takikawa
213f2024a0 Use any/c for the ip-address-string? domain
Previously, it was `string?` which is needlessly
restrictive and caused premature contract failures.

Please merge into 5.3.4

original commit: 5735d37794
2013-04-08 11:18:57 -04:00
Eli Barzilay
0a2edd7045 Avoid output in ftp tests.
Also add a note explaining why the output is not tested.

original commit: 26273db266
2013-04-05 02:23:43 -04:00
Eli Barzilay
92358cb553 Misc improvements to net/dns' and net/private/ip'.
* Some racketisms.

* Use explicit `in-list' etc in for loops.

* Remove some redundant requires from `net/dns'.

* Move all tests to `tests/net', including a new `tests/net/ip'.  In the
  future there's a plan to have things like stripped zos etc for
  distribution, but we're not there yet, and the net collection is
  already organized nicely so this also makes it more uniform.

* Include the dns tests in the main test file.

original commit: 6149134011
2013-04-05 02:23:43 -04:00
Asumu Takikawa
518051a4b3 Fix the returned type of dns-get-mail-exchanger.
original commit: 8483a1493f
2013-04-04 16:11:28 -04:00
Asumu Takikawa
e3c806296d Fix ipv4 check on addresses with a leading 0
original commit: 02989b23a1
2013-04-04 14:03:23 -04:00
Asumu Takikawa
58ad235030 Refine contract check
original commit: 0b55cf3df2
2013-04-04 14:03:23 -04:00
Asumu Takikawa
ab5c430480 Fix equality check
original commit: e62bb05f05
2013-04-04 14:03:23 -04:00
Asumu Takikawa
7d931543f6 Make IP addresses immutable
original commit: f904bd8ba5
2013-04-04 14:03:23 -04:00
Asumu Takikawa
3822cad523 Use net/private/ip in net/dns
This simplifies the code by outsourcing IP
address functionality to net/private/ip.

original commit: 92102a2f07
2013-04-04 13:05:56 -04:00
Asumu Takikawa
a1d0fe9fe1 Add an IP address library
The library currently lives in a private subfolder so
that the interface can still be changed. The idea is to
eventually make it a top-level `net` library once it is
more mature.

original commit: 4e76ae8c11
2013-04-04 13:05:56 -04:00
Jay McCarthy
ab3a963a1b Removing the planet2 name from the code
original commit: 9f337c632a
2013-03-22 07:45:14 -06:00
Jay McCarthy
8bde42b9d5 Adding test logging facility to rackunit and eli-tester, with its own test and docs
original commit: 804791b011
2013-03-21 07:02:50 -06:00
Eli Barzilay
caa7435c1a Fix lots of indentation mistakes.
(Found by my ayatollah script...)

original commit: af6be85ff5
2013-03-14 10:55:47 -04:00
Asumu Takikawa
a66f244fd9 Fix identifier typo
original commit: de99fdb867
2013-03-09 17:13:59 -05:00
Jay McCarthy
3fd203d3d5 Extending cookie support with expiration
Providing access to paths on id-cookies

Change PNR to limit checksum updating unless forced

original commit: 6bf03c1244
2013-03-07 10:21:03 -07:00
Asumu Takikawa
1f8820eeaf Set the socket protocol family
Allows the use of an IPv6 nameserver

original commit: 312792ac4d
2013-03-02 13:36:34 -05:00
Asumu Takikawa
e128f02d8d Support reverse lookups with IPv6 addresses
original commit: 3ab83001b4
2013-03-02 14:26:28 -05:00
Asumu Takikawa
a49b615b9a Shorten IPv6 addresses for display
original commit: cf4c71a51f
2013-03-02 14:26:28 -05:00
Asumu Takikawa
0f309cd525 Support querying AAAA records for IPv6
original commit: c2e8ef30e4
2013-03-02 14:26:27 -05:00
Asumu Takikawa
77a70d3e52 Start to add internal documentation
original commit: 621fc2b256
2013-03-02 14:09:30 -05:00
Asumu Takikawa
e9b40d3e69 Add DNS tests
original commit: 94b2ebddfa
2013-03-01 16:22:36 -05:00
Asumu Takikawa
b0e565e19b Another small contract fix
original commit: 50cd4645c1
2013-03-01 16:22:36 -05:00
Asumu Takikawa
e8bd0b51c6 Fix net/dns contracts
original commit: 14c77c39d2
2013-03-01 00:48:11 -05:00
Asumu Takikawa
ad2b0c6587 Add contracts to net/dns functions.
original commit: 9d08d69d07
2013-03-01 00:05:40 -05:00
Matthew Flatt
bd39158cab terminology change again: "cross-phases persistent" modules
original commit: 88a36a077c
2013-02-27 08:53:43 -07:00
Matthew Flatt
02fb754fac minor decompiler tweak
original commit: a46849f3b9
2013-02-27 08:53:43 -07:00
Matthew Flatt
d728e9118d try "phase-collapsing" instead of "phaseless"
original commit: 2646ff6895
2013-02-26 19:01:36 -07:00
Matthew Flatt
e97bb74005 add experimental support for "phaseless" modules
The intent is to support phase-crossing data such as the `exn:fail:syntax'
structure type that is instantiaed by macros and recognized by contexts
that use `eval' or `expand'. Phaseless modules are highly constrained,
however, to avoid new cross-phase channels, and a module is inferred to
be phaseless when it fits syntactic constraints.

I've adjusted `racket/kernel' and improved its documentation a little
so that it can be used to implement a phaseless module (which can
import only from other phaseless modules).

This change also adds a `flags' field to the `mod' structure type
from `compiler/zo-structs'.

original commit: 899a3279c2
2013-02-26 14:55:28 -07:00
Eli Barzilay
ee16347918 Improve comment.
original commit: 46894e0cc6
2013-02-19 00:22:47 -05:00
Matthew Flatt
b2e68957cd net/ftp: put temp file for download in directory of destination
original commit: f1b4c86519
2013-02-14 13:03:58 -07:00
Robby Findler
0deb045dde tweak raco test output, yet again
original commit: 86b1f276eb
2013-02-07 10:16:16 -06:00
Robby Findler
12592019cd change raco test's announcements to say "raco test"
original commit: 7750cf9800
2013-02-07 06:58:11 -06:00
Matthew Flatt
cde0a28779 make raco test' more like racket'
Instad of `(dynamic-require .. #f)', use `(dynamic-require .. 0)', which
has the effect of making compile-time code "available" (see docs) in
case the loaded module uses `eval' on syntax objects that refer to
non-kernel syntax.

original commit: 0aaf6b8086
2013-02-06 18:09:03 +01:00
Robby Findler
55edebebbd adjust raco test so it test the command-line
arguments to the empty vector before running anything

original commit: 2b7c6e32a9
2013-02-04 20:38:34 -06:00
Robby Findler
80dd8d58f7 change printouts from raco test to be slightly more informative
original commit: 44e91ea961
2013-02-03 15:31:40 -06:00
Robby Findler
81b3b34895 adjust raco test so that it accepts multiple -s arguments on the command-line
This is, afaict, a completely backwards compatible way to add this
functionality in the sense that any of the non-error command-line
arguments passed to raco test before still do precisely the same
things

original commit: 9fd4698be9
2013-02-03 13:14:55 -06:00
Matthew Flatt
06eb0e67e2 repairs to extflonum changes
original commit: 28493dcc88
2013-01-29 05:53:30 -07:00
Michael Filonenko
cb9baa4f4d extflonums
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).

[Patch provided by Michael Filonenko and revised by Matthew.]

The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).

original commit: 17b8092641
2013-01-28 18:17:06 -07:00
Jay McCarthy
c13876971b Working with links in collection testing
original commit: 3312a8064d
2013-01-10 10:45:54 -07:00
Jay McCarthy
22acfa3cba test - Supporting packages in raco test
original commit: 9015c15eec
2013-01-09 08:12:56 -07:00
Jay McCarthy
ea00418cfe Extending raco test to work on collections
original commit: 3e0fff7dff
2013-01-09 07:59:47 -07:00
Matthew Flatt
3c01f128b9 raco exe: yet another submodule repair
Closes PR 13410

original commit: e66cd6f9c7
2013-01-05 09:12:47 -07:00
Jay McCarthy
39f5f77fd4 Fixing PR13374
original commit: 921456f3ad
2012-12-17 16:28:46 -07:00
Matthew Flatt
e8f889eb05 net/url: add `current-url-encode-mode'
Changing `current-url-encode-mode' from 'recommended to 'unreserved
causes `url->string' to encode !, *, ', (, and ) using %, which
can avoid confusing some parsers.

See also https://github.com/plt/racket/pull/198

original commit: b8b8260379
2012-12-17 06:56:38 -07:00
Matthew Flatt
8a061420d0 net/uri-codec: added `uri-path-segment-unreserved-encode'
original commit: 3d1f1289ef
2012-12-17 06:32:59 -07:00
Chen Xiao
95d818431b A tiny bug in documents of ftp
original commit: a04ae51f64
2012-12-17 05:45:40 -07:00
Matthew Flatt
a951303303 net/ftp: make progress proc keyword, change progress protocol
The revised protocol for a progress procedure doesn't create
the thread automatically, and it provides an event to indicate
when the progress count changes.

original commit: e0de33a005
2012-12-13 07:45:26 -07:00
Chenxiao
d668029836 Improve ftp client. Add upload, progress monitor and something else.
original commit: 4cc287f7e5
2012-12-13 07:09:04 -07:00
Philippe Mechai
51f0506e7e Added path->url tests for directory paths
This check that no regression was introduced with 733d95b.

original commit: 201534b7ad
2012-11-27 08:46:40 -07:00
Matthew Flatt
0731559f69 net/imap: log to an 'imap logger
original commit: e4e4d544f5
2012-11-23 18:44:51 -07:00
Matthew Flatt
3b9e13b38f fix to bytecode compiler's propoagation of local-type info
This is another old bug that could have caused validation failures
with flonums, but it showed up with fixnum tracking because fixnums
are more common (e.g., from `string-length').

There were really two bugs: information installed at the
wrong offet in one place, and a failure to detect that information
should be propagated in a different place. Fixing both avoids
a validation problem with `html/sgml-reader'.

original commit: afca33b78b
2012-11-18 10:31:20 -07:00
Matthew Flatt
bbc7d243e9 fix compiler/zo-marshal
Missed some updates for recent local-type changes. Also, fix up a
few field names in the demodularizer.

original commit: d7eddb91ef
2012-11-15 06:18:05 -07:00
Matthew Flatt
d003549257 bytecode compiler: generalize local-type tracking for unboxing
Track fixnum results in the same way as flonum results to enable
unboxing, if that turns out to be useful. The intent of the change,
though, is to support other types in the future, such as "extnums".

The output `raco decompile' no longer includes `#%in', `#%flonum',
etc., annotations, which are mostly obvious and difficult to
keep in sync with the implementation. A local-binding name now
reflects a known type, however.

The change includes a bug repair for he bytecode compiler that
is independent of the generalization (i.e., the new test case
triggered the old problem using flonums).

original commit: bdf1c3e165
2012-11-14 19:37:01 -07:00
Matthew Flatt
85715ca473 fix demod for submodules
original commit: 623265d1e8
2012-11-12 07:47:30 -07:00
Matthew Flatt
03c5a46331 fix `lazy-require' in phase levels other than 0
The `lazy-require' form expands to `define-runtime-module-path-index',
whch doesn't work right at phase levels other than 0. Work around the
problem by generating a submodule to hold the
`define-runtime-module-path-index' form.

This repair fixes `raco exe' on certain uses of `match', which in turn
uses `lazy-require' at compile time.

Also, use `register-external-module' to generate appropriate
dependencies on lazily loaded modules.

original commit: 6b16679b39
2012-11-11 09:38:16 -07:00
Eli Barzilay
0dd947ab15 #lang racket' -> #lang racket/base' conversions in demodularizer.
original commit: 4c8d1f67b2
2012-11-07 08:03:45 -05:00
Eli Barzilay
91b048020e Newlines at EOFs.
original commit: 14d8c8b5a5
2012-11-06 14:07:15 -05:00
Danny Yoo
e023d133e7 adding close-eval at the end of scribble files that have a toplevel evaluator
original commit: dcf4d8b040
2012-11-01 15:32:53 -06:00
John Clements
7c864d188f exposed mapping for unreserved characters
original commit: 1f02a0a8b8
2012-11-01 12:38:09 -07:00
Matthew Flatt
ad98dc0ddf track import "shapes" as procedure or structure type
Shape information allows the linker to check the importing
module's compile-time expectation against the run-time
value of its imports. The JIT, in turn, can rely on that
checking to better inline structure-type predicates, etc.,
and to more directy call JIT-generated code across
module boundaries.

In addition to checking the "shape" of an import, the import's
JITted vs. non-JITted state must be consistent. To prevent shifts
in JIT state, the `eval-jit-enabled' parameter is now restricted
in its effect to top-level bindings.

original commit: d7bf677645
2012-10-30 13:29:28 -06:00
Jay McCarthy
191874f50f second attempt at removing reliance on tcp. available has been greatly simplified because it relied on the behavior the thread.rktl test is actually testing
original commit: f16e76ca32
2012-10-26 15:26:39 -06:00
Jay McCarthy
7d47105aac Test localhost tcp before running echo server test
original commit: 552fe0f755
2012-10-23 11:28:27 -06:00
Jay McCarthy
eeace01d3b changing tests for environments where listen fails
original commit: 09dd60789a
2012-10-19 15:24:20 -06:00
Matthew Flatt
4807353e8d bytecode validator: check "constant" annotations on variable references
Bytecode changes in two small ways to help the validator:
 * a cross-module variable reference preserves the compiler's
   annotation on whether the reference is constant, fixed, or other
 * lifted procedures now appear in the module body just before the
   definitions that use them, instead of at the beginning of the
   module body

original commit: e59066debe
2012-10-19 11:27:52 -06:00
Matthew Flatt
5eaf286081 fix raco exe' for module+' submodules
Closes PR 13116

Merge to v5.3.1

original commit: e1a6d2b07d
2012-10-17 16:28:41 -06:00
Matthew Flatt
639af63b3f fix planet `raco exe' tests
Merge ot v5.3.1

original commit: bd146e2d8d
2012-10-17 16:28:41 -06:00
Matthew Flatt
f6441369d9 raco exe: handle failing submodule search correctly
An attempt to detect a submodule could trigger the original module
name resolver when the would-be enclosing module would be handled
by the embedding-specific resolver. When a submodule is not found
but its would-be enclosing module is embedded, then assume that
the default resolver wouldn't find the submodule, eithe --- and
therefore avoid a potential "collection not found" error.

original commit: 3fb12b4ff4
2012-09-23 10:47:24 -05:00
Jay McCarthy
d9f2ed0abc adding an optional argument to get-pure-port/headers
original commit: a1e855a035
2012-08-16 14:47:09 -06:00
Matthew Flatt
841bbb465d compiler/zo-marshal: repair mashaling of import info in syntax
original commit: 0bd53a3549
2012-08-06 15:32:27 -06:00
Matthew Flatt
462f389bb2 normalize module rename info to vector in ".zo" format
This is related to the receent repairs for submodules and
`variable-reference->namespace'.

Merge to v5.3

original commit: 5a1bc5ad40
2012-07-24 07:22:57 -05:00
Matthew Flatt
3c46e5fdc6 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3

original commit: d95ec4d454
2012-07-22 11:54:46 -05:00
Matthew Flatt
3fcc8dc945 more submodule repairs for `raco exe'
original commit: a605183a0a
2012-07-16 10:02:13 -06:00
Matthew Flatt
bf4ad3fdb6 move commented-out tests to `test' submodule
original commit: c747af21e3
2012-07-15 10:32:33 -06:00
Matthew Flatt
a8aec864b9 `raco decompile' fix
original commit: c69ea5569f
2012-07-01 09:25:12 -06:00
Matthew Flatt
4be962e720 fix problems with references to bindings at higher phases
original commit: 577cf4592e
2012-06-27 09:57:50 -06:00
Matthew Flatt
359eb87abb fix zo-parse, zo-struct, etc. for context in whole-module import
original commit: 6173b7eb05
2012-06-23 05:21:53 -07:00
Matthew Flatt
fd364dc2de raco exe: checks on source and destination paths
Disallow creating a launcher whose source is the launcher itself,
for example.

original commit: 2fcb635790
2012-05-28 20:30:58 -06:00
Eli Barzilay
45ee870f98 Streamline more test suits.
original commit: 6260b4c239
2012-05-24 11:27:13 -04:00
Matthew Flatt
767cae7e20 raco decompile: show `require's
original commit: 68029b4ade
2012-05-16 07:12:26 -06:00
Matthew Flatt
c9f62c0bc5 fix `compiler/zo-parse', etc. for phase-shift addition
original commit: d93f4214a4
2012-05-13 09:00:28 -06:00
Matthew Flatt
95e0451656 zo-parse update for phase-shift syntax object marshaling
original commit: 92db2b4fb3
2012-05-13 06:57:44 -06:00
Matthew Flatt
5139f5e8d6 allow #f as shift for `syntax-shift-phase-level'
original commit: dbd940611e
2012-05-12 00:55:12 -06:00
Eli Barzilay
c33561e005 A bunch of fprintf' -> eprintf' conversions (and a few related things).
original commit: 17090fca4f
2012-05-06 12:06:00 -04:00
Eli Barzilay
ae29015ee7 A bunch of fprintf' -> eprintf' conversions (and a few related things).
original commit: 17090fca4f
2012-05-06 12:06:00 -04:00
Eli Barzilay
d0f469f166 Fix command-line for the demodularizer.
Closes PR 12731.

original commit: 16d40c3170
2012-04-28 05:23:43 -04:00
Matthew Flatt
ac6210c42e save modidx submodule path in bytecode form
This change should have been part of 9ba663aa77.

original commit: f099eec2af
2012-04-26 21:45:00 -06:00
Matthew Flatt
7afd70f96e fix Planet resolver for submodule tests
For example, `(module-declared? '(submod (planet dyoo/bf) reader) #t)'
shouldn't fail if there's no "main.rkt" to hold a `reader' submodule;
it should return #f.

Merge to 5.3, but updating cstartup.inc will require a manual merge.

original commit: 862e1628a6
2012-04-19 08:15:11 -06:00
Matthew Flatt
4b4a17b3c6 fix `raco demod' for new submodule fields in zo structs
original commit: 16d65ed251
2012-04-04 07:37:30 -06:00
Danny Yoo
197004495a Optimize cpt-table-lookup
(Tweaked by Eli.)

original commit: 8f2ea07ec5
2012-04-04 02:52:51 -04:00
Robby Findler
51cf8696b3 adjust the contract on string->url so that it actually catches all of
the errors that would be signalled by the body. also, remove
url-regexp from the exports (it was only recently added)

I believe this eliminates two of Eli's concerns:

  - the contract is no longer so painful to read

  - the performance is more reasonable.

Specifically, for the performance, here are the times I see to call
string->url on "http://www.racket-lang.org":

no contract: any/c
cpu time: 564 real time: 566 gc time: 3

weak contract: (-> (or/c string? bytes?) url?)
cpu time: 590 real time: 590 gc time: 3

strong, regexp-based contract:
(-> (or/c (not/c #rx"^([^:/?#]*):") #rx"^[a-zA-Z][a-zA-Z0-9+.-]*:") url?)
cpu time: 632 real time: 633 gc time: 5

This appears to be about a 10% slowdown for the regexp-based contract
over the weaker contract.

related to PR 12652

original commit: 86572cc8c3
2012-03-29 19:31:32 -05:00
Matthew Flatt
5868d51521 make --run-if-absent' the default mode for raco test'
This convention makes it easier to deal with a set
of ".rkt" files that implement tests, while a `test'
module implements a `main'-like split for some of the
files.

original commit: 63a4414863
2012-03-29 14:55:14 -06:00
Matthew Flatt
6a69441d84 promote raco test'; demote raco unpack'
original commit: 96e4fa0d13
2012-03-29 14:55:14 -06:00
Robby Findler
1b243ce46b apply Andy's diff (and adjust the documentation correspondingly)
closes PR 12652

original commit: fdf3fa6492
2012-03-27 12:21:17 -05:00
Matthew Flatt
32da9b50bb doc corrections and improvements related to submodules
In particular, add `module+' to the Guide.

original commit: 876bc6f02b
2012-03-22 15:12:55 -06:00
Eli Barzilay
db82f0dd43 Remove no-longer used net/cgi exceptions.
original commit: 818e434c60
2012-03-16 02:55:35 -04:00
Matthew Flatt
95ed87abd4 decompiler repairs related to changes for submodules
original commit: 5dc08cbe03
2012-03-12 09:04:37 -06:00
Matthew Flatt
51972b8036 net/imap: add TLS support
Based on a patch from Thomas Spurden

original commit: 537f194c4e
2012-03-10 10:47:22 -07:00
Jay McCarthy
98fa97ae26 racket/slice, expand raco test, remove begin-for-testing
original commit: f8325776cf
2012-03-09 19:51:42 -07:00
Jay McCarthy
9741ae6d98 Adding module**, when-testing, and raco test
original commit: b73444a0f3
2012-03-09 15:54:18 -07:00
Matthew Flatt
f2dbacc73f raco exe' uses a main' submodule, if any
original commit: 85802f45f2
2012-03-09 10:34:57 -07:00
Matthew Flatt
a0837b2453 first cut at submodules
original commit: 3d69dfab86
2012-03-09 10:34:56 -07:00
Matthew Flatt
43ad58579f net/smtp: fix auth encoding to not add extra CRLFs
Closes PR 12501

original commit: b656219f8a
2012-02-21 06:14:44 -07:00
Matthew Flatt
dbe90fa15e add optional newline argument to `base64-encode'
original commit: a12f9831a3
2012-02-21 06:14:44 -07:00
Matthew Flatt
02d466aec0 add --launcher'/-l' flag to `raco exe' to create launchers
This addition triggered several other changes:

 * -k for a Mac OS X embedding is now relative to the __PLTSCHEME
   segment (which means that executables won't break if you strip
   them, for example)

 * the command-line no longer has a limited size for Mac OS X
   launchers and embedding executables

 * Mac OS X GUI and Windows launchers record the creation-time
   collection path, unless they are created as "relative" launchers

original commit: 2c479683d1
2012-02-13 16:27:51 -07:00
Matthew Flatt
ee5fdf3771 change `raco demod' test to write to temporary drectory
Also add `-o' option to `raco demod'.

original commit: 577f38f649
2012-02-10 14:02:12 -07:00
Matthew Flatt
90583ce572 adjust `raco ctool --c-mods' and related to work with places
That is, the generated declare_modules() function registers the
module-declaration code so that it is run in any new place, too.

Merge to 5.2.1

original commit: 481e061440
2012-01-19 13:14:02 -07:00
Matthew Flatt
aae4950f02 fix raco ctool --c-mods' for racket'
Merge to 5.2.1

original commit: 6c4cd0e9c2
2012-01-19 13:14:02 -07:00
Matthew Flatt
f751553b48 document raco make' flags; add --disable-constant' flag
original commit: 6b6d281dee
2012-01-19 13:14:02 -07:00
Matthew Flatt
e6d06d9bd5 net/mime: allow any subtype, exns as exn:fail subtypes; doc fixes
original commit: 7153fbd4d5
2012-01-08 12:14:51 -07:00
Eli Barzilay
6feb946842 Minor typo in recent new regexp.
original commit: 3fcd3c04d5
2011-12-28 21:07:25 -05:00
Jay McCarthy
83d3a6d984 Synchronizable events from Tom McNulty
original commit: ae31b19168
2011-12-26 14:33:07 -07:00
Eli Barzilay
97f880fb94 More fixes and improvements to `net/unihead'.
* In base64 encoding remove all newlines from the encoded result, avoids
  getting an invalid result.

* In qp encoding:
  - replace all spaces by underlines, not just the first (looks like a
    typo in the previous code)
  - encode "?"s and "_"s too, as required for this encoding
  - remove soft newlines (again, avoid an invalid result)

* Use `regexp-replace*' to encode the parts between the lines.  Besides
  making the code simpler, it fixes a bug in the previous code where
  multiple lines would each get encoded and the results concatenated
  without the newlines or any other whitespace.

* When the string to be encoded is longer than 70 characters, split and
  encode the sub-parts, then concatenate the encodings with a "\n "
  separator.  This is done as a poor attempt to follow the line length
  limits specified in rfc2047, or more concretely, to avoid sendmail's
  "!\n " splitting.

original commit: ed8e3367d4
2011-12-21 14:46:13 -05:00
Eli Barzilay
b232bb25ac Fixes and improvements to `net/unihead'.
* Use `re:non-ascii' to look for a non-ascii character => faster.

* Use either CR or LF for a newline, not just LF.

* Use `regexp-replace*' to encode the parts between the lines.  Besides
  making the code simpler, it fixes a bug in the previous code where
  multiple lines would each get encoded and the results concatenated
  without the newlines or any other whitespace.

original commit: 188c65661d
2011-12-21 14:46:13 -05:00
Eli Barzilay
42503882a8 Quote sender, subject, and recipients strings if needed.
There might be existing uses of `net/sendmail' that did this quoting
since this code didn't do so.  Such uses would continue to work fine,
since quoted strings would already be plain ASCII, so a second quoting
would leave it as is.

Note that the quoted strings are also used as command line arguments.
It seems that sendmail deals with these all fine when they appear as
command line arguments.  This means that any valid email address format
can be used, not just "raw" emails.  If there are some sendmails that
don't do this, then it would be better to add a `-t' flag to let
sendmail parse the text in the message.

One caveat (not a new one): since they're passed as is, it is possible
to use two emails in a single string, as in "a@b.com, c@d.com".  This
could lead to obvious problems if someone uses "Bar, Foo <foo@bar.org>"
instead of "\"Bar, Foo\" <foo@bar.org>".  (Using a `-t' to parse the
content won't help with that...)  The only way to avoid this would be to
parse the emails and quote the name part if needed.  But that's a much
hairier piece of code.

original commit: ddcab952f7
2011-12-20 16:13:13 -05:00
Eli Barzilay
609cd0e81b Revise `net/sendmail'.
* Move the `X-Mailer' header to the top, so that the interesting headers
  are all together at the bottom (the top gets littered by server
  headers anyway).

* Use `subprocess' directly (`process*' wasn't really doing anything
  more than that).

* Allow the sender to be `#f', leaving the header out.  This makes all
  sendmails that I've used use the username that is running the process.

* Just search for a sendmail program: don't barf on windows, so it can
  be used in case there is a sendmail.exe executable there.

* Remove `no-mail-recipients' to make it in-line with other racket code
  that doesn't raise super-specific exceptions.

* Use port counting instead of doing the counts manually, much simpler
  code.

original commit: f9d07d8400
2011-12-20 15:53:40 -05:00
Matthew Flatt
cd5e01e03c fix `raco make --no-deps'
original commit: b87a7c0ec9
2011-12-13 06:13:17 -07:00
Jay McCarthy
1d9be26746 Fixes PR9965 and a missing doc xref
original commit: 12580337f2
2011-12-07 06:23:25 -07:00
Matthew Flatt
1963cc91b7 fix demod for inline-variant
original commit: 788e8bb5f4
2011-12-03 06:15:58 -07:00
Matthew Flatt
52fa72bd6b 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).

original commit: 779b419c03
2011-11-30 07:39:36 -07:00
Jay McCarthy
cce647bd8f Revert "Forgot to include doc change"
This reverts commit ccd5061c87.

original commit: 37a7e0a2e1
2011-11-23 11:13:21 -07:00
Jay McCarthy
ad78dea87a Revert "This fixes 10497 and potentially breaks programs that assume the query of a URL is always a list. I have fixed uses in the Web Server, which I expect is the major thing affected, but much more could be. Therefore I am skeptical this is a good idea just for the representation of ?. So, I'd like other people to review the change and let me know if they think I should revert it."
This reverts commit 7f9818bb3e.

original commit: 41e04b33da
2011-11-23 11:13:20 -07:00
Jay McCarthy
02759a74df Forgot to include doc change
original commit: ccd5061c87
2011-11-23 10:59:54 -07:00
Jay McCarthy
26326b6235 This fixes 10497 and potentially breaks programs that assume the query of a URL is always a list. I have fixed uses in the Web Server, which I expect is the major thing affected, but much more could be. Therefore I am skeptical this is a good idea just for the representation of ?. So, I'd like other people to review the change and let me know if they think I should revert it.
original commit: 7f9818bb3e
2011-11-23 10:59:54 -07:00
Rodolfo Carvalho
7631e920bc Add missing word 'one', clarify behavior of the 'semi-or-amp mode.
original commit: f43405543a
2011-10-17 13:18:17 -04:00
Matthew Flatt
9d2461bca5 more `raco exe' cycle repairs
original commit: b6a9330bf1
2011-10-07 10:32:49 -06:00
Matthew Flatt
7d7888d2ba fix compiler bug related to lifting and unbox flonums
As variables are dropped for lifted functions, the bitmap
for flonum closure variables was not shifted down by the
number of dropped variables.

Closes PR 12259

original commit: 7680adf486
2011-10-05 19:25:59 -06:00
Matthew Flatt
a849681b7d remove `raco exe' plot test
original commit: fe1909581b
2011-10-05 09:40:27 -06:00
Robby Findler
8f9006e82e add support for redirections to get-pure-port and add get-pure-port/headers
original commit: 11a3d9b0ac
2011-10-03 13:21:30 -05:00
Robby Findler
853e6d7827 adjust the "Transfer-Encoding: chunked" code to re-use bytes more
agressively

original commit: 1fa6129afc
2011-10-03 13:21:29 -05:00
Matthew Flatt
701a815db1 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'.

original commit: 0ab6637539
2011-09-20 15:26:39 -06:00
Kevin Tew
9f5362d806 Fix pr 12205 pass --disable-inline and --vv options through to parallel make
original commit: 099e89a297
2011-09-20 11:10:56 -06:00
Eli Barzilay
569f5e20a9 Some selective #:when (not ...)' -> #:unless ...'.
original commit: 623c7493ed
2011-09-16 10:48:18 -04:00
Matthew Flatt
c626b6fc7c add ++aux' flag to raco exe'
original commit: ca0d7b5ef4
2011-09-09 17:03:18 -06:00
Matthew Flatt
c663b1e957 fix demod for `begin-for-syntax' changes
original commit: b1eab296f4
2011-09-08 19:19:14 -06:00
Matthew Flatt
278f090e83 generalized `begin-for-syntax'
original commit: d3c56c9f13
2011-09-08 14:06:00 -06:00
Jon Zeppieri
1431714123 Moved `net/url' code from unit to module.
original commit: d44a7a480a
2011-09-05 15:22:39 -04:00
Jon Zeppieri
d0f1f6fa23 Moved `net/uri-codec' code from unit to module.
original commit: 3f69d4c8e8
2011-09-05 15:22:39 -04:00
Jon Zeppieri
e143a3af4f Moved `net/smtp' code from unit to module.
original commit: 647d3fb365
2011-09-05 15:22:39 -04:00
Jon Zeppieri
3e399465aa Moved `net/sendmail' code from unit to module.
original commit: 9ab674fd0c
2011-09-05 15:22:38 -04:00
Jon Zeppieri
eadd27b8d0 Moved `net/qp' code from unit to module.
original commit: d034297c76
2011-09-05 15:22:38 -04:00
Jon Zeppieri
185aa9c20a Moved `net/pop3' code from unit to module.
original commit: 54deaac318
2011-09-05 15:22:38 -04:00
Jon Zeppieri
6728cc4597 Moved `net/nntp' code from unit to module.
original commit: df5fef0c95
2011-09-05 15:22:38 -04:00
Jon Zeppieri
96dfe15d91 Moved `net/mime' code from unit to module.
original commit: 67ca846fd9
2011-09-05 15:22:38 -04:00
Jon Zeppieri
120ab7af22 Moved `net/imap' code from unit to module.
original commit: 9ae3840211
2011-09-05 15:22:38 -04:00
Jon Zeppieri
944338b0f6 Moved `net/head' code from unit to module.
original commit: 095ee4e007
2011-09-05 15:22:38 -04:00
Jon Zeppieri
1a0336d99b Moved `net/ftp' code from unit to module.
original commit: 03237c06f2
2011-09-05 15:22:38 -04:00
Jon Zeppieri
e16b530ded Moved `net/dns' code from unit to module.
original commit: a0eac7ac5c
2011-09-05 15:22:38 -04:00
Jon Zeppieri
2add6a09dc Moved `net/cgi' code from unit to module.
original commit: a5222b9481
2011-09-05 14:17:36 -04:00
Jon Zeppieri
932ab5feab Moved `net/base64' code from unit to module.
original commit: 0104198875
2011-09-05 14:13:04 -04:00
Robby Findler
1161087456 remove extraneous path->string conversion
original commit: bb71539233
2011-09-05 08:30:48 -05:00
Matthew Flatt
d622961559 change `raco exe' to disable collection lookup by default
original commit: ecc058de4a
2011-08-25 09:15:30 -06:00
Matthew Flatt
dd20d04fff add `raco unpack'
Although the ".plt" format is going to be replaced, the format is
currently viable for distributing collections, and I have wanted
a raw `unpack' command for a while. It was useful today to fix
problems with `raco pack' and collection links.

original commit: 2dbaa45e1b
2011-08-24 20:08:18 -06:00
Matthew Flatt
77ba4327f7 fix `compile-collection-zos'
original commit: bdadc453e0
2011-08-21 11:43:59 -06:00
Matthew Flatt
55e9e0ddd7 trivial doc fix
original commit: 1b0abe85c7
2011-08-19 12:52:19 -06:00
Matthew Flatt
053734c4c8 fix compiler handling of top-/module-level constants
The JIT and bytecode compiler disagreed on the definition of
"constant". Now there are two levels: "constant" means constant across
all instantiations, and "fixed" means constant for a given instantation.
The JIT uses this distinction to generate direct-primitive calls
or not. (Without the distinction, a direct jump to `reverse' could
be wrong, because `racket/base' might get instantiated with the
JIT disabled or not.)

Also, fixed a bug in the JIT's `vector-set!' code in the case that
the target vector is a top-/module-level reference that is ready,
fixed, or constant.

original commit: 7eb2042bd9
2011-08-19 06:32:44 -06:00
Jay McCarthy
9dfe50c8cf De-unitizing cookies and making the serializable
original commit: b207f1051a
2011-08-15 10:06:21 -06:00
Eli Barzilay
c75da5fd97 Lots of documentation formatting.
Started as fixing misindented definitions, then more indentations, then
a bunch of similar things (square brackets, huge spaces at end-of-lines,
etc).

original commit: d61eb53686
2011-08-15 07:50:04 -04:00
Eli Barzilay
62e93cf2a4 Heavily revise this test.
- Simplify code
- Remove bogus leftover (tests) in the end
- Resolve deadlock that resulted from using `tcp-abandon-port' in
  `net/ftp'
- Actually there's no need for threads, probably because of small size
  of data, so keep it.
- Use scribble syntax instead of here-strings, and move the text out of
  the way.

original commit: f297c98c1a
2011-08-15 02:37:39 -04:00
Matthew Flatt
b342b9b044 fix doc typos
original commit: be0260792e
2011-08-10 08:28:13 -06:00
Matthew Flatt
eec721ff4c generalize #%variable-reference' and add variable-reference-constant?'
Use the new functions to make the expansion of keyword applications
to known procedure work  with mutation.

original commit: 5352d670c4
2011-08-09 16:33:17 -06:00
Eli Barzilay
c2e489dc78 Add an optional path argument to `ftp-directory-list'.
original commit: 5a7ddd6611
2011-08-05 01:14:16 -04:00
Eli Barzilay
6a6f849c5c Return a file size string when possible.
This takes the advice from
  http://files.stairways.com/other/ftp-list-specs-info.txt
further: search for the date by an explicit occurrence of a known month
name.  This means that we won't see files with bad names (they'd be
filtered out of the result), but the filtered out entries are ones that
would not be usable with `ftp-make-file-seconds'.

When the month is found, and the entry is a file, look for a number
preceding the month, and if found, return it as the file size string.
This is a minor change in the API.  (But it's probably better to either
revise it further, or eventually make it irrelevant by exposing the
interesting functionality via `net/url'.)

original commit: 6a1336e75e
2011-08-05 01:14:16 -04:00
Eli Barzilay
55405d017b Make `ftp-make-file-seconds' use a correct year instead of 2002.
This function was using 2002 when there's no year...  Updated it to use
the last occurrence of the guessed date, as described at
  http://files.stairways.com/other/ftp-list-specs-info.txt

This function still looks pretty bogus -- the RFC does *not* say
anything about the format of response to `LIST', so it's whatever
semi-random thing the server does.  (The above link looks like an
attempt to fix it, but I didn't see anything more official than that.)
From some looking around, it looks like ftp clients just try a bunch of
patterns against the text.  Add also warnings in the documentation about
this.

original commit: 234015b34d
2011-08-05 01:14:16 -04:00
Eli Barzilay
844402b102 Remove all mentions of `locale' from the docs.
It's utf-8 now, but that's the default in the docs anyway.

original commit: 99d48abcf3
2011-08-05 01:14:16 -04:00
Matthew Flatt
eaed2b9eaf fix compiler/zo-parse for sequence splice
Merge to 5.1.2

original commit: 42f41d868a
2011-07-22 22:19:58 -04:00
Matthew Flatt
481f10a622 fix zo-parse of rename tables
original commit: 07a9cdd2a8
2011-07-13 10:45:19 -06:00
Matthew Flatt
32d8828ab5 improve decompiler handling of syntax object
original commit: 5e49e0adea
2011-07-08 06:22:40 -06:00
Matthew Flatt
1f9a6339e4 fix decompile of define-values-for-syntax
original commit: 5bc8b67eba
2011-07-07 07:25:48 -06:00
Eli Barzilay
d6dad89d3a ".ss" -> ".rkt" scan done.
original commit: 3157955d40
2011-07-02 10:37:53 -04:00
Eli Barzilay
2f65de9812 ".ss" -> ".rkt" scan done.
original commit: 3157955d40
2011-07-02 10:37:53 -04:00
Matthew Flatt
b5181ff032 adapt demodularizer to `compiler/zo-struct' change
original commit: 98740390fa
2011-07-01 22:46:20 -06:00
Ryan Culpepper
205c99022d docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names

original commit: 1b702a2ae3
2011-07-01 17:16:53 -06:00
Matthew Flatt
ae33722071 fix `compiler/zo-parse' & co.
original commit: 69ad39d45c
2011-06-30 08:24:41 -06:00
Eli Barzilay
d3a49471f7 A long overdue scan to eliminate files without terminating newlines.
(DrRacket should really do that.)

original commit: 40124a0619
2011-06-28 02:01:41 -04:00
Eli Barzilay
f90858601d A long overdue scan to eliminate files without terminating newlines.
(DrRacket should really do that.)

original commit: 40124a0619
2011-06-28 02:01:41 -04:00
Eli Barzilay
15cd89c4af Finish converting scheme' -> racket'.
Everything compiles fine now even if the compatibility bindings are
gone.

original commit: a38f384a00
2011-06-28 00:45:38 -04:00
Eli Barzilay
333c1506a9 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.

original commit: ac26fe7554
2011-06-25 04:08:47 -04:00
Eli Barzilay
a8092eea36 Correction to the small correction
original commit: 8990177c75
2011-06-20 16:45:33 -04:00
Eli Barzilay
54f8c69298 Small correction
original commit: f08ce64e07
2011-06-20 15:41:57 -04:00
Matthew Flatt
f9c5f5dbe3 adjust and document net/url HTTPS support
original commit: f3da5f7fd8
2011-06-20 08:00:43 -06:00
Eli Barzilay
dfc0ca2908 Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)

original commit: debd1f9f1e
2011-06-20 04:27:14 -04:00
Matthew Flatt
7c644a8eac "under <platform>" -> "on <platform>"; "X" -> "Unix"
I originally picked "under" as the preposition to go before
 a platform name, but obviously you should build "on" a
 platform, and "under" suddenly annoys me. The choice of "on"
 is now codified in the documentation style guide. Meanwhile,
 "Unix" insted of "X" seems more clear and consistent in the
 `racket/gui' docs.

 More usefully, this patch also fixes a few out-of-date
 platform-specific claims.

original commit: f34a31cac9
2011-06-17 18:54:43 -06:00
Eli Barzilay
1ca7b10829 Fix "zo-parse.rkt" wrt the inclusion of `identity' in mzlib/etc, and
switch to racket (making `begin-with-definitions' redundant).

original commit: fc1b974cd2
2011-06-07 13:06:13 -04:00
Matthew Flatt
f17d94056f fix tl-map parse & marshal
original commit: 8ad8d5b7f7
2011-05-09 12:24:05 -06:00
Matthew Flatt
ee407d6610 fix varref' in compiler/zo-structs', etc.
and sync docs better with implementation

original commit: a4da2a3f4c
2011-05-09 09:43:32 -06:00
Matthew Flatt
13e715ef44 fix decompiler's listing of captured top- and module-level variables
original commit: db75dddf87
2011-05-08 17:01:23 -06:00
Matthew Flatt
87373a2e0c reorgnize datatypes of less common bytecode forms
removing a layer of indirection, and setting up
 for an internal reorganization of the compiler code

original commit: e9721058fb
2011-05-06 06:56:23 -06:00
Matthew Flatt
805b8627f3 fix zo-marshal' for #f toplevel-map in lam'
original commit: 87a4132b40
2011-05-03 14:43:27 -06:00
Matthew Flatt
1955c935ff break link to namespaces from from closures over top-/module-level vars
- the `lam' structure from `compiler/zo-struct' changed to include a
   `toplevel-map' field

 This change helps solve a finalization problem in `racket/draw',
 which in turn sigificantly reduces the peak memory use of `raco setup'
 during the doc-building phase (because some documents load `racket/draw'
 to render images, and multiple copies of `racket/draw' were retained
 before finalization was fixed).

 The change is an extreme way to solve a specific finalization
 problem, but it's a kind of space-safety improvement; space safety
 almost never matters, but when it does, then working around a lack of
 space safety is practically impossible. In this case, it's not clear
 how to otherwise solve the `racket/draw' finalization problem.

 The improvement doesn't change the representation of closures, but it
 requires special cooperation with the GC. All closures in a module
 continue to share the same array of globals (plus syntax objects);
 that is, instead of completely flat closures, Racket uses a two-level
 environment where top-/module-level variables are grouped
 together. The code half of a closure now records which
 top-/module-level variables the body code actually uses, and the mark
 phase of GC consults this information to retain only parts of the
 top-/module-level environment frame that are actually used by some
 closure (or all of the frame if it is accessible through some other
 route).  In other words, the GC supports a kind of "dependent
 reference" to an array that is indexed by positions into the array
 --- except that the code is more in the "Racket" directory instead of
 the "GC" directory, since it's so specific to the closure
 representation.

original commit: 2ada6d0e89
2011-05-03 06:57:49 -06:00
Eli Barzilay
a8ef109b6e Disable xdg-open, since it seems like it suffers from the same problem
gnome-open does.

Relevant (but not really a solution) to PR 11869.

original commit: 020946cb2a
2011-04-23 08:51:05 -04:00
Matthew Flatt
9f2fba9625 safe-for-space repairs for functions with rest args
original commit: 0754ad0114
2011-04-22 15:59:33 -06:00
Matthew Flatt
b3fd71415d cache loaded compiled modules
using a SHA1 hash stored in the marshaled bytecode; this cache
 lowers the cost of sandboxes or other uses of multiple namespaces
 when the code inspector doesn't change; the caching is almost
 transparent, but an eval handler might be called with compiled
 code that cannot be written

original commit: 97ce26b182
2011-04-16 13:24:58 -06:00
Eli Barzilay
67404ee615 * scheme -> racket
* Use `delay/sync' to fix possible races (should fix PR11788)

* Move Chrome up after firefox since it's very widely supported now

* Add xdg-open

original commit: 52ca08a8a9
2011-04-12 07:26:09 -04:00
Eli Barzilay
ad323a2665 Use "127.0.0.1" instead of "localhost" which can be more fragile.
(It's possible to have issues with "localhost", for example when there's
something in a $LOCALDOMAIN environment variable, which made this test
fail on certain machines.)

original commit: 22afec432c
2011-03-03 11:10:12 -05:00
Eli Barzilay
a3b9b386fe Use proper raco command name in make and pack.
Fixes PR 11719.

original commit: 0f14c6aa67
2011-02-09 21:13:55 -05:00
Kevin Tew
80de0713e8 raco make -j
original commit: 2e1dffbfcc
2011-02-01 08:27:56 -07:00
Robby Findler
5b5c803b8c adjusted the framework preferences system to work better with failures under windows
original commit: cde613218e
2011-01-20 14:07:12 -06:00
Jay McCarthy
24c47fb793 Expanding documentation and doing some renaming/providing
original commit: 823da4321f
2010-12-07 15:08:36 -07:00
Jay McCarthy
0ccf9ccd71 Fixing example
original commit: f5e9e0dad1
2010-12-07 14:14:52 -07:00
Jay McCarthy
00134af67b Removing test because we reintroduced gensym
original commit: b686cc84a9
2010-11-24 23:33:42 -05:00
tv
e0be19cac1 add #:tcp@ to ws-serve for wss: support
original commit: 11f2653b7e
2010-11-24 23:33:42 -05:00
Matthew Flatt
37f822ccb2 restore gen-id gensym so that decompiler works
original commit: 0a8e5e604e
2010-11-11 14:39:45 -07:00
Blake Johnson
74c7025e6e scrbl file and longer command name
original commit: 199a63772a
2010-10-30 12:49:27 -06:00
Jay McCarthy
c428f6cafe Exposing more values to GC by not making them toplevels
original commit: 26c7625c79
2010-10-30 09:14:58 -06:00
Jay McCarthy
5f064063f5 Saving time by only reading zos once and saving space by limiting the extent of the hash tables
original commit: 255489e0af
2010-10-30 08:54:13 -06:00
Jay McCarthy
e5b1e20529 Removing newlines from debug messages
original commit: 46e2e7931a
2010-10-30 08:31:23 -06:00
Jay McCarthy
aae51fbb87 Repairing tests
original commit: ec7157744f
2010-10-29 21:32:31 -06:00
Blake Johnson
8ae1cd0c3e only creating zo file
original commit: 783418ce37
2010-10-29 19:50:12 -06:00
Blake Johnson
345f30f7e5 rolling back some unnecessary changes
original commit: a315f79ebd
2010-10-29 19:50:12 -06:00
Blake Johnson
969c0f4d58 replacing self modidx refs and tests
original commit: b2b5875e3e
2010-10-29 19:50:12 -06:00
Blake Johnson
8392dd8fa4 fixing logging and running code in zo-exs
original commit: 0688c18593
2010-10-29 19:50:11 -06:00
Blake Johnson
b8122efb82 using hasheq in zo-marshal
original commit: 43e151f340
2010-10-29 19:50:11 -06:00
Blake Johnson
7e97041b8d debugging
original commit: 77c46d07ee
2010-10-29 19:50:11 -06:00
Blake Johnson
6b8a9b0861 Avoiding cycles in everything but closures
original commit: 7bffbc31a2
2010-10-29 19:50:11 -06:00
Blake Johnson
7aac10e938 offset calculation fix
original commit: d84b78daab
2010-10-29 19:50:11 -06:00
Blake Johnson
e0e144e210 changed eprintfs to log-debug
original commit: 3ddda200e8
2010-10-29 19:50:11 -06:00
Blake Johnson
1f2e1c6647 moved demodularizer from github to collects and added it to raco
original commit: 4676662e4b
2010-10-29 19:50:10 -06:00
Jay McCarthy
52163c7f17 Describing architecture a little
original commit: 039fc7095a
2010-10-21 22:29:27 -07:00
Jay McCarthy
4830a2d141 Removing debugging aid
original commit: 089e99fac6
2010-09-16 12:45:38 -06:00
Blake Johnson
d2ad91ae38 removing indirects from zo handling
original commit: c88eb704c7
2010-09-16 12:45:37 -06:00
Eli Barzilay
be19dcb79d Use "<path>" instead of a misleading "<file>",
improve doc line for `--collect'.

original commit: 41812ace0f
2010-09-12 01:53:52 -04:00
Blake Johnson
aa0d3e18ae fixing pr11175, added only-rest-arg-not-used flag
original commit: 3433af0a30
2010-09-10 14:46:04 -06:00
Blake Johnson
4c5dfd88af fixing pr11036 by adding plain certificates
original commit: 170ab47dc2
2010-09-10 14:46:04 -06:00
Blake Johnson
428d1d383d re-enabling tests
original commit: 1cb11ce6cc
2010-09-10 14:46:04 -06:00
Blake Johnson
1f08f65282 removing debugging information
original commit: 6338a97e0a
2010-09-10 14:46:04 -06:00
Blake Johnson
4d82ab734e Changing memory limit
original commit: 407a36c9d2
2010-09-10 14:46:04 -06:00
Blake Johnson
785033b880 Removing pieces of zo-test-worker we dont care about
original commit: e94823b82c
2010-09-10 14:46:03 -06:00
Blake Johnson
78d5856d4d never sharing hashes and trace debugging
original commit: 0d136ba4c7
2010-09-10 14:46:03 -06:00
Blake Johnson
070d86473d traversing inside closures and using a seen set for lists
original commit: 32a9e60abe
2010-09-10 14:46:03 -06:00
Blake Johnson
b8fe95cd26 fixing closure problem
original commit: 2dfaab00f4
2010-09-10 14:46:03 -06:00
Blake Johnson
a5f557b90e zo-marshal fixes and switching back to prefabs
original commit: ecc9ceb842
2010-09-10 14:46:03 -06:00
Blake Johnson
46f22d2882 handling closures while writing symbol table
original commit: c2fee2a2f0
2010-09-10 14:46:03 -06:00
Blake Johnson
b816da148d quoting parameter and not prefab structs
original commit: 893294674a
2010-09-10 14:46:02 -06:00
Blake Johnson
b63f532735 encoding wraps and fixes for zo-marshal sharing
original commit: 54f2d34a2e
2010-09-10 14:46:02 -06:00
Blake Johnson
4379002ddc traverse while writing rather than a separate step
original commit: 88dcab6b5a
2010-09-10 14:46:02 -06:00
Blake Johnson
ae4b770939 zo-marshal fixes and read.c fix for hash tables in symbol table
original commit: 9599304ca9
2010-09-10 14:46:02 -06:00
Blake Johnson
817b3186d9 zo-marshal single out-anything function and zo-parse debugging
original commit: 37f07cb68b
2010-09-10 14:46:01 -06:00
Blake Johnson
1d54bf17a5 zo-parse debugging and read in zo-exs
original commit: f27fe3d5c9
2010-09-10 14:46:01 -06:00
Matthew Flatt
1b3843bd9c fix yet more ss<->rkt problems that interfered with *SL executables
Closes PR 11106

original commit: 76c3c76214
2010-08-30 14:35:18 -06:00
Jay McCarthy
7fbbc1b527 Moving stress tests
original commit: f899e03b59
2010-08-30 06:39:12 -06:00
Jay McCarthy
21c34d29d4 Increasing FTP test stability
original commit: bc15f398f2
2010-08-28 18:52:39 -06:00
Eli Barzilay
f38ec26ea5 More "~n" -> "\n" changes
original commit: 8e0f8dd39c
2010-08-26 12:11:00 -04:00
Eli Barzilay
33624300a8 Change a bunch of "~%" and "~n" in format strings to "\n".
original commit: 7dc4d2e5a6
2010-08-25 17:17:01 -04:00
Eli Barzilay
9bebb5a98d Lots of "~e" to "~.s" changes.
original commit: 606b7f60dc
2010-08-25 17:17:01 -04:00
Matthew Flatt
03593e433b teach decompiler about literal prims from `#%futures'
original commit: 9be0559936
2010-08-25 14:58:27 -06:00
Jay McCarthy
58ec991bd1 Adding WebSocket stress test and improving fit output
original commit: 5eb8f181f6
2010-08-19 16:34:16 -06:00
Jay McCarthy
646061cf40 Adding WebSocket example
original commit: 1f61e7eb7f
2010-08-19 16:34:15 -06:00
Jay McCarthy
1adbeaa73f Adding WebSocket support
original commit: 347e946548
2010-08-19 16:34:15 -06:00
Matthew Flatt
4b9635cb70 fix bytecode-writing inconsistencies related to syntax objects and paths
and improve organization of the docs

original commit: 0d9f5016ba
2010-08-17 17:18:24 -06:00
Jay McCarthy
98c8c339e6 FTP tests without a network connection
original commit: 928dfd6fa2
2010-08-11 13:49:10 -06:00
Blake Johnson
f907cbf361 better traversal for more sharing in zo-marshal and some refactoring.
original commit: f4abd35f5c
2010-08-04 17:09:57 -06:00
Blake Johnson
aee68bb788 cases for more complicated lexical renames
original commit: b062c900a1
2010-08-03 15:40:41 -06:00
Blake Johnson
c998fe85e9 applying make-prefab-struct
original commit: 551ef5ba30
2010-08-02 19:27:28 -06:00
Blake Johnson
2efb39c391 another all-from-module fix
original commit: 7653ce037b
2010-08-02 19:26:32 -06:00
Blake Johnson
f7c42c1e6a Added case in zo-marshal for prefab structs
Made quoted not-prefab so it isn't captured by prefab case

original commit: 63c6cc5d2c
2010-07-30 15:44:52 -06:00
Blake Johnson
7c32e885f3 better certificate handling in zo-parse and zo-marshal
original commit: 80c6ba482d
2010-07-30 14:37:17 -06:00
Eli Barzilay
ad67592f98 typo
(cherry picked from commit 14de7399bd)

original commit: 700cb5ee8d
2010-07-30 05:25:25 -04:00
Eli Barzilay
bb6903c6bf typo
original commit: 14de7399bd
2010-07-30 04:20:46 -04:00
Blake Johnson
8e7a64be3f added another case for all-from-module renames
original commit: 2dfd340031
2010-07-28 14:45:07 -06:00
Blake Johnson
b662bdef4c closing stderr in zo-test
original commit: 8b195d1c3c
2010-07-28 14:42:48 -06:00
Blake Johnson
d8dae45321 Do not use CPT_ESCAPE for every CPT_QUOTE, instead if it was a protect-quote, then just put the CPT_QUOTE in.
original commit: 53fdc09e7a
2010-07-27 13:39:43 -06:00
Jay McCarthy
9b95b87049 Fixing parts of zo-marshal re protect-quote; parallelizing zo-test; there is no the path error again in zo-marshal though
original commit: 8d36dfad81
2010-07-27 11:10:54 -06:00
Jay McCarthy
99c7fa04e2 Fixing up a few things in zo-parse/etc
original commit: 28432037af
2010-07-26 12:18:01 -06:00
Blake Johnson
78faf5e6d6 zo-marshal wrap fixes, optional port for zo-parse
original commit: 8eeed89982
2010-07-26 12:06:02 -06:00
Matthew Flatt
b4ec84d1a9 another ss->rkt repair to exe creator
Merge to 5.0.1
(cherry picked from commit ce03a34318)

original commit: 6c79f0d399
2010-07-20 18:44:54 -04:00
Matthew Flatt
8e53d9458b raco exe: fix missing ss->rkt conversion and remove debugging printf
Merge to 5.0.1
(cherry picked from commit f602d11a7f)

original commit: 77a0796a6c
2010-07-20 18:44:37 -04:00
Matthew Flatt
c1d54547d8 another ss->rkt repair to exe creator
Merge to 5.0.1

original commit: ce03a34318
2010-07-20 06:37:02 -06:00
Matthew Flatt
b6a4c4ed65 extend decompiler to handle #%variable-reference
original commit: 5cc0baa01e
2010-07-20 06:35:58 -06:00
Matthew Flatt
3128c02641 raco exe: fix missing ss->rkt conversion and remove debugging printf
Merge to 5.0.1

original commit: f602d11a7f
2010-07-19 14:00:23 -06:00
Blake Johnson
1325701f82 handling top-level-renames and mark-barriers
(cherry picked from commit 8df94dd746)

original commit: 06c829d8c0
2010-07-18 18:57:26 -04:00
Blake Johnson
6887ead2c5 handling top-level-renames and mark-barriers
original commit: 8df94dd746
2010-07-15 15:53:02 -06:00
Ryan Culpepper
c64f9c5582 Added uses of unstable/struct
original commit: 07f57aac9b
2010-07-13 12:07:47 -06:00
Matthew Flatt
5b322e2bd7 fix `planet'-path bug in module-name resolver for generated eecutables
original commit: 195b37831b
2010-07-09 09:48:41 -06:00
Matthew Flatt
d35c8cac36 fix validation of module .zo exp-time content, and fix zo-marshal
original commit: c7c8f56e11
2010-07-08 17:17:42 -06:00
Matthew Flatt
2cd7824462 fix docs on `raco make --no-deps'
Closes PR 11018

original commit: a8062dc37d
2010-07-07 13:56:16 -06:00
Kevin Tew
4fc9ef6316 [Parallel-Build] remove -u, -j 1 is uniprocessor, SETUP_OPTIONTS => PLT_SETUP_OPTIONS
original commit: c9e84f9f67
2010-07-06 10:07:40 -06:00
Kevin Tew
c919d0df5f Parallel collects build (process-based) "raco setup -u"
original commit: 35c28f4f66
2010-07-02 14:27:08 -06:00
Ryan Culpepper
405f94f6fc unstable: removed byte-counting-port.rkt (use open-output-nowhere instead)
updated test to verify that open-output-nowhere has same behavior

original commit: a543c2137e
2010-07-01 17:05:06 -06:00
Jay McCarthy
a616f14181 Close connection sooner
original commit: fc91321f21
2010-06-29 13:49:01 -06:00
Jay McCarthy
a5c309a12b Nail down port and dont conflict
original commit: 2e5c04f083
2010-06-29 13:23:23 -06:00
Jay McCarthy
6a9fe98a22 Fixing PR 10970
original commit: 428412036f
2010-06-23 16:29:23 -06:00
Vincent St-Amour
aa49f6b2de Added an empty benchmark to measure Typed Scheme's startup time.
original commit: 31d4da6f39
2010-06-18 17:42:59 -04:00
Matthew Flatt
d19d9eb8f7 tweak decompiler to use a different name for boxed locals
original commit: 535c8e0a09
2010-06-10 07:32:11 -04:00
Jay McCarthy
684a88a0e8 Debugging
original commit: 3ff7b0461c
2010-06-02 10:20:19 -06:00
Jay McCarthy
304e5247ed Documenting make-hasheqv and using it
original commit: 7e485b8d28
2010-05-27 12:35:30 -06:00
Jay McCarthy
7b264d5089 Using placeholders in zo-parse for more cyclic datums
original commit: 035ee93911
2010-05-27 12:35:26 -06:00
Jay McCarthy
2fd3353508 Dealing with cyclic hashes
original commit: 4088448317
2010-05-27 12:33:26 -06:00
Jay McCarthy
cac230bc93 Unifying some code
original commit: 5833f7cba4
2010-05-27 12:33:26 -06:00
Jay McCarthy
a6bd87b632 Cyclic zo tests
original commit: 612bd22bfe
2010-05-27 12:33:25 -06:00
Matthew Flatt
2da4caee6c fix problems with raco exe
Merge to v5.0

original commit: 7442f14305
2010-05-26 17:07:09 -06:00
Jay McCarthy
f0add80ef2 Do not read the entire zo at once
original commit: 2a934cb053
2010-05-24 13:14:36 -06:00
Jay McCarthy
cc82e80835 Separating bytes usage for next change
original commit: f67177f740
2010-05-24 13:14:36 -06:00
Jay McCarthy
2e344d9137 Making zo-marshal more like C and not with large byte strings
original commit: 40e1ba95fc
2010-05-24 13:14:35 -06:00
Jay McCarthy
3e79a47bfd Reformating
original commit: 325ac1ae88
2010-05-24 13:14:35 -06:00
Jay McCarthy
4c1a8c8321 Reformating
original commit: 63f546a080
2010-05-24 13:14:35 -06:00
Jay McCarthy
46f7907aca Streaming final output from zo-marshal
original commit: b892c276ff
2010-05-24 13:14:35 -06:00
Jay McCarthy
3b0c151ba1 Removing test auto run
original commit: 85a7509034
2010-05-24 09:56:35 -06:00
Jay McCarthy
76b1f30a2f Initial ftp test cases
original commit: 15d9a7dd8a
2010-05-24 09:56:35 -06:00
Jay McCarthy
732ec40e10 rkt suffixes
original commit: 52281d7089
2010-05-24 09:56:35 -06:00
Jay McCarthy
d5d36523f5 Racketizing
original commit: 63df5311c5
2010-05-24 09:56:34 -06:00
Eli Barzilay
12ab929e59 A lot of "plt-scheme.org" -> "racket-lang.org"s.
original commit: a46743211b
2010-05-17 00:53:12 -04:00
Eli Barzilay
50c18d0b92 A lot of "MrEd" -> "GRacket"s.
original commit: 7f6efdc8be
2010-05-16 23:46:05 -04:00
Eli Barzilay
fa984eb710 A lot of "MzScheme" -> "Racket"s.
original commit: 2d9601089d
2010-05-16 18:26:26 -04:00
Matthew Flatt
c9e6b6cd0a have 'raco make' require an argument so that it doesn't silently do nothing when no files are supplied
original commit: 68fee973de
2010-05-10 06:27:57 -06:00
Eli Barzilay
367c055644 Attempt to properly documents the `external-browser' mess.
Hopefully fixing PR10900.

original commit: d9917b27a0
2010-05-08 23:32:54 -04:00
Matthew Flatt
fc1a05de68 fix decompiler
original commit: 6cfc0b481d
2010-05-08 07:37:07 -06:00
Matthew Flatt
dc8bf19a52 rackety misc docs
original commit: eb15dceb34
2010-05-07 09:13:51 -06:00
Matthew Flatt
4305d5eaa0 more test repairs
original commit: 5a93e8c5e0
2010-05-02 08:31:12 -06:00
Matthew Flatt
de34946306 use .rktl suffix for files meant to be 'load'ed
original commit: e504acb726
2010-05-01 09:58:16 -06:00
Matthew Flatt
a714e5c02a use .rktl suffix for files meant to be 'load'ed
original commit: e504acb726
2010-05-01 09:58:16 -06:00
Matthew Flatt
28316d5205 change 'raco c-ext' to 'raco ctool'
original commit: 81ba669237
2010-04-30 21:55:14 -06:00
Sam Tobin-Hochstadt
97a22c0320 loadtest.ss -> loadtest.rkt
original commit: 85fad33c4c
2010-04-30 16:35:48 -04:00
Sam Tobin-Hochstadt
51c4e1f2d8 loadtest.ss -> loadtest.rkt
original commit: 85fad33c4c
2010-04-30 16:35:48 -04:00
Matthew Flatt
8c6fbadb8c fix some DrDr tests
original commit: f20d3db75f
2010-04-29 19:55:39 -06:00
Matthew Flatt
a0686e07c1 move tests/mzscheme to tests/racket
original commit: 882b7dce0e
2010-04-27 18:28:39 -06:00
Matthew Flatt
a42c49472e move tests/mzscheme to tests/racket
original commit: 882b7dce0e
2010-04-27 18:28:39 -06:00
Matthew Flatt
9ed60bcafa rename all files .ss -> .rkt
original commit: 28b4043077
2010-04-27 16:50:15 -06:00
Matthew Flatt
0fcf163a4d rename all files .ss -> .rkt
original commit: 28b4043077
2010-04-27 16:50:15 -06:00
Jay McCarthy
4baa63802a Moving error output to stderr
original commit: 5823da1710
2010-04-27 09:35:01 -06:00
Jay McCarthy
f0906d3131 Fixing cookie regex
original commit: 96a3f47ea0
2010-04-27 08:48:07 -06:00
Matthew Flatt
d650fa8fdd racket-tool -> raco
original commit: 22470e4147
2010-04-24 07:46:56 -06:00
Matthew Flatt
d898152fa1 rico -> racket-tool
original commit: c862eb8121
2010-04-21 14:24:07 -06:00
Matthew Flatt
6e479fda65 create core binaries as 'racket' and 'gracket'
original commit: 0f0a59732e
2010-04-15 21:15:57 -04:00
Matthew Flatt
abd90494f9 better compiler handling of unused local bindings where the RHS either doesn't obviously produce a single value or is discovered to be unused late in bytecode compilation; initial Scribble support for printing qq-style results
svn: r18737

original commit: c5ac9f23ec
2010-04-06 15:52:36 +00:00
Matthew Flatt
3832a4ae1a rico
svn: r18733

original commit: fdba97b1c0
2010-04-04 15:08:35 +00:00
Matthew Flatt
9136b6b85d chaperones (v4.2.5.3)
svn: r18650

original commit: 73807aef24
2010-03-28 01:10:33 +00:00
Jay McCarthy
7516285c61 Stricter cookie contracts
svn: r18629

original commit: e69a18eefd
2010-03-26 16:07:35 +00:00
Jay McCarthy
e5aee8eedd Adding a work around for the compiler bug... plus I like it better. And adding a regression test for the compiler.
svn: r18619

original commit: 55c3176934
2010-03-25 18:14:11 +00:00
Jay McCarthy
e3c66c9d47 Supporting byte-regexps and boxes in tester. Improving speed/allocation of parser and noting places where we could do better. Updating struct contracts in code and docs.
svn: r18262

original commit: 1eea5163cc
2010-02-22 15:47:57 +00:00
Jay McCarthy
c5b4be68d5 Adding comments and specs to parser.
Clarifying comments in marshaller. Supporting small numbers, small symbols, small marshalleds, small (proper) lists, small svectors, all-from-module long form

Improving inequality detector in tester: regexps and uninterned symbols

Correcting doc contract

svn: r18194

original commit: 7d1a739df5
2010-02-19 19:47:15 +00:00
Jay McCarthy
f95ba34192 Adding testing for zo parser/marshaller/decompiler
svn: r18155

original commit: fb73b168d1
2010-02-18 21:07:05 +00:00
Ryan Culpepper
5d8ca32454 compiler/zo-parse: fixed to work on Mac/PPC
zo writer seems to always write integers in little-endian order

svn: r18141

original commit: f4321256a5
2010-02-17 23:36:58 +00:00
Jay McCarthy
3562d9f416 Forgot to add a file
svn: r18131

original commit: 2ffa8cb34f
2010-02-17 21:38:06 +00:00
Jay McCarthy
21a504a86c Added new primitive: symbol-unreadable?
Updated Scheme implementation of zo parsing and marshaling
- Separated the structs into a different file and added contracts
- Implemented stxobj marshalling
- Fixed many small bugs in parser and marshaller
- Added new structs for new parser cases

Done by Blake Johnson (BYU)
Committed by Jay

svn: r18130

original commit: a8d00cc3b3
2010-02-17 21:33:00 +00:00
Matthew Flatt
6d26d894e1 improve inling to support ((let (....) (lambda ....)) arg ...) patterns; allow nested 'let's for local flonum binding (which fixes a problem where unsafe flonum operations could end up much slower than safe ones)
svn: r17972

original commit: 3812f8ca72
2010-02-05 00:16:06 +00:00
Eli Barzilay
699d7e2583 remove redundant find-exe
svn: r17595

original commit: 84f55d9647
2010-01-10 15:46:54 +00:00
Matthew Flatt
0c18f10bf8 fix problem with flmin/flmax and cgc
svn: r17532

original commit: f7f6b972fd
2010-01-07 16:33:26 +00:00
Matthew Flatt
3b650e1e15 built-in fixnum ops; bug fix related to misuse of flonum ops; questionable attempt to improve inlining algorithm
svn: r17461

original commit: 38d7e8fea2
2010-01-02 16:33:28 +00:00
Robby Findler
38e685e68f svn: r17412
original commit: 8d3eb3c9b9
2009-12-28 16:47:24 +00:00
Robby Findler
2439114095 added google-chrome
svn: r17402

original commit: 913dde245c
2009-12-25 21:24:49 +00:00
Matthew Flatt
1b7935c819 scheme/flonum (v4.2.3.8)
svn: r17348

original commit: fdd7122994
2009-12-18 15:40:00 +00:00
Matthew Flatt
2d1e7602c1 fix up validator, decompiler, and zo-marshaler for flonum-argument annotations
svn: r17341

original commit: cab948d61f
2009-12-17 20:17:48 +00:00
Matthew Flatt
ab1cebd148 unboxed known-flonum loop accumulators
svn: r17338

original commit: bc47db42e4
2009-12-17 15:58:29 +00:00
Matthew Flatt
66b8a274d7 unboxing of let-bound flonums (v4.2.3.6)
svn: r17328

original commit: 45e84ca087
2009-12-16 13:30:40 +00:00
Matthew Flatt
e489b59124 decompiler fix to indicate that unsafe-flvector-ref can be unboxed
svn: r17289

original commit: cd961f4a6b
2009-12-13 20:13:20 +00:00
Matthew Flatt
b1aeeac4a9 bytecode-compiler changes to help enable flonum unboxing
svn: r17283

original commit: 5772fa0a9f
2009-12-13 04:39:46 +00:00
Matthew Flatt
06aeb59448 add unsafe-f64vector-{ref,set!} and improve JIT to inline arithmetic ops with more than 2 arguments
svn: r17068

original commit: 61dd4ca0b9
2009-11-26 15:07:16 +00:00
Eli Barzilay
11341711ff some obvious-ness
svn: r16595

original commit: bac7b6318b
2009-11-07 02:39:10 +00:00
Matthew Flatt
4e9963b06b update decompiler for changed type number
svn: r16227

original commit: 7529e8d4a9
2009-10-02 23:39:29 +00:00
Matthew Flatt
1d0a044921 fix typos (could merge to 4.2.2)
svn: r16120

original commit: a8f50e76a7
2009-09-24 14:49:17 +00:00
Matthew Flatt
95420f055d unsafe ops (v4.2.1.8)
svn: r15899

original commit: 8ae0ea9d14
2009-09-06 18:24:46 +00:00
Matthew Flatt
bf222f9bc2 adjust planet client to handle nested planet invocations by re-building the doc index only once
svn: r15246

original commit: 53a011cf65
2009-06-23 22:02:07 +00:00
Eli Barzilay
7d589dfcff The Scribble reader was improved to make it pull out the syntax
punctuations outside of the form, as it does with quote punctuations.
So things like this

  #, @foo{...}

that required the space to make the @foo read as a scribble form are
now better written as

  @#,foo{...}

This changes all such occurrences.  (In case you see this change in
your files and are worried that there might be changes: I mechanically
verified that the result of `read'ing the modified files is identical
to the previous version.)

svn: r15111

original commit: 4288c6c2c7
2009-06-07 10:12:32 +00:00
Matthew Flatt
8caf639791 identifier-prune-lexical-context (4.2.0.2)
svn: r14850

original commit: 70859f0d0b
2009-05-17 12:31:51 +00:00
Matthew Flatt
57312ea2d5 zo-marshal patch from Jay
svn: r14642

original commit: b42f1b5d8b
2009-04-28 16:37:16 +00:00
Matthew Flatt
3b13ccd8fe zo-marshal supports module forms
svn: r14637

original commit: 39d405fe6e
2009-04-28 13:13:22 +00:00
Matthew Flatt
cd3f1c8707 fix zo-parse problem with graphs in literal data
svn: r14596

original commit: 2439b4cb75
2009-04-24 17:34:49 +00:00
Matthew Flatt
0a8691e0bb fix accidental commit of debugging printf
svn: r14595

original commit: 6df0ac6f51
2009-04-24 15:49:24 +00:00
Matthew Flatt
5b767d0b08 (v4.1.5.5) repair interaction of provides redirected by a rename-transformer, certification of access to unexported variables, and protected exports; also get rid of kernel-reprovide special case in export handling, because a more general export-sharing technique subsumed the special case long ago
svn: r14593

original commit: cd09b30497
2009-04-24 14:59:09 +00:00
Eli Barzilay
918f16c1aa Changed @itemize{...} to @itemize[...] (done after comparing the doc
tree and verifying that there are no changes).
(Also fixed a few bugs that were in the code)

svn: r14427

original commit: c0a8a01222
2009-04-05 17:46:20 +00:00
Stevie Strickland
0500950bc1 Sam and I did some work to allow automatic inferred linking in
(define-values/)invoke-unit/infer.

svn: r14315

original commit: 99aac7d745
2009-03-27 13:47:12 +00:00
Matthew Flatt
dd550f0a77 better eof handling in zo-parse
svn: r14252

original commit: 3b49038947
2009-03-24 18:38:18 +00:00
Eli Barzilay
303b647cc3 Added a `file' "test suite", with only tests for inflate/deflate.
svn: r14147

original commit: c69045008d
2009-03-17 14:57:01 +00:00
Eli Barzilay
926459b339 remove old net tests
svn: r14144

original commit: 5d6b74d3b6
2009-03-17 11:42:31 +00:00
Eli Barzilay
57d491ad1e new copy of net tests, split into modules, and using my test macro
svn: r14143

original commit: b647ea2ae9
2009-03-17 11:41:06 +00:00
Eli Barzilay
00a530a3d8 Converted the cgi tests to use my test macro, and included them in the
nightly testing.

svn: r14139

original commit: 2008456d64
2009-03-17 07:04:16 +00:00
Jay McCarthy
7bb5dd7c67 pr7974 + include in release
svn: r14132

original commit: f9c4e4eb54
2009-03-16 18:45:16 +00:00
Matthew Flatt
bd5bfaba1c all expression forms tested for zo-marshal
svn: r13998

original commit: 282a404ada
2009-03-06 23:27:10 +00:00
Matthew Flatt
c350bac4dd some zo-marshal repairs
svn: r13984

original commit: 946a39221a
2009-03-06 17:37:28 +00:00
Matthew Flatt
cde9437405 zo-marshal bug fixes and start at test suite
svn: r13979

original commit: f1e646c8f9
2009-03-06 15:22:33 +00:00
Matthew Flatt
0d40ac7b7f partially working compiler/zo-marshal
svn: r13976

original commit: 5a8bd8b724
2009-03-06 02:23:19 +00:00
Matthew Flatt
a724fe6a00 rename write-bytecode to zo-marshal
svn: r13974

original commit: 25e7978999
2009-03-06 00:48:08 +00:00
Matthew Flatt
9cc0f1b7cd initial version of write-bytecode
svn: r13973

original commit: a1f0873143
2009-03-06 00:45:13 +00:00
Eli Barzilay
4fea8ef742 Fix typo found by offby1
svn: r13611

original commit: ea51547cae
2009-02-15 20:26:21 +00:00
Jay McCarthy
e3adf55ef1 cookies
svn: r13397

original commit: 0b816d2942
2009-02-03 22:32:35 +00:00
Robby Findler
bf3aa92f31 allows colons in the userinfo field of a url (ie, does not encode them)
svn: r13282

original commit: 134138916f
2009-01-25 20:12:08 +00:00
Eli Barzilay
47596db0d2 newlines at EOFs
svn: r13105

original commit: d1a0086471
2009-01-14 03:10:47 +00:00
Matthew Flatt
c53917fa4f document compiler/zo-parse and compiler/decompile
svn: r12947

original commit: 7aec6b8761
2008-12-28 18:57:13 +00:00
Matthew Flatt
8432051c18 fix ready-toplevel optimization
svn: r12905

original commit: 064776348a
2008-12-19 17:16:39 +00:00
Matthew Flatt
0e41ae2e49 trim some fat from module-variable references
svn: r12833

original commit: cf8b75939b
2008-12-13 17:38:14 +00:00
Matthew Flatt
34af15866c fix decompiler for recent .zo change
svn: r12722

original commit: d8c28545ea
2008-12-07 19:07:47 +00:00
Matthew Flatt
2a6f851d43 decompiler repairs
svn: r12537

original commit: 1a4b3abba7
2008-11-20 13:47:06 +00:00
Sam Tobin-Hochstadt
a309f0efe4 Fix doc typo.
svn: r12515

original commit: 8dad54e520
2008-11-19 22:49:43 +00:00
Matthew Flatt
66ad436925 make the optimizer slightly smarter, so that it can see through more patterns of nested let and letrec procedure bindings
svn: r12434

original commit: 59f3f19f84
2008-11-14 00:48:54 +00:00
Matthew Flatt
c3ee691e9d improved JIT inlining of 'list'
svn: r12428

original commit: bac4053c37
2008-11-13 16:42:15 +00:00
Matthew Flatt
5730650642 change mzc verbosity
svn: r12333

original commit: f076494c48
2008-11-06 18:54:12 +00:00
Matthew Flatt
0150fc24ed fix more bugs with lib paths in exe creation
svn: r12175

original commit: 487df2362e
2008-10-30 10:55:07 +00:00
Matthew Flatt
25ac110c4f split scribble/manual module into smaller modules
svn: r12150

original commit: ea659ba286
2008-10-28 01:40:51 +00:00
Matthew Flatt
8b1b6eec7f jit tweaks
svn: r12144

original commit: 00d2aabaf0
2008-10-27 19:00:13 +00:00
Matthew Flatt
67030288cd finish decompiler on syntax objects
svn: r12077

original commit: e2d4bc0d2b
2008-10-21 00:10:47 +00:00
Matthew Flatt
128081a8e9 unit bug fixes related to new scoping of signature elements; change scribble/manual to compute ids typeset as variables at compile time, in preparation for moving from a parameter to syntax bindings; fix docs typos; extend decompiler's support for unmarshaling syntax objects
svn: r12046

original commit: 7a55275a26
2008-10-15 22:23:56 +00:00
Matthew Flatt
9794d09d56 fix bug in exe creation where 'lib runtime-paths could be mis-parsed as mzlib paths
svn: r11966

original commit: 89f2315374
2008-10-07 16:00:36 +00:00
Matthew Flatt
42ec054ab9 add read-language, module-compiled-language-info, and module->language-info
svn: r11827

original commit: dd7db9ff7b
2008-09-21 16:00:42 +00:00
Eli Barzilay
8b65f4ac26 more base64-related changes
svn: r11470

original commit: 20e9673028
2008-08-28 21:00:53 +00:00
Matthew Flatt
9ed7e7ba98 fix letrec compilation when call/cc is used on the RHS of something that otherwise looks like it could be let*; add #%in annotations to decompiler output
svn: r11329

original commit: ebab4270bf
2008-08-19 15:18:09 +00:00
Matthew Flatt
ba41523036 document 'mzc --decompile'
svn: r11317

original commit: 76cf25fc12
2008-08-19 00:50:52 +00:00
Matthew Flatt
436c1a119a add --decompile blade to mzc and refine decompiler output
svn: r11310

original commit: 64c655a516
2008-08-19 00:04:20 +00:00
Matthew Flatt
19a098a7fa expose safe-for-space clearing in decompilation
svn: r11307

original commit: e611829b76
2008-08-18 22:34:38 +00:00
Matthew Flatt
da32616652 add with-cont-mark decompilation
svn: r11306

original commit: 6a0a40773b
2008-08-18 22:28:08 +00:00
Matthew Flatt
a290d88c64 initial version of decompiler
svn: r11305

original commit: 1d754e8f66
2008-08-18 22:19:52 +00:00
Matthew Flatt
9b6503df48 fix '(nonnegative|positive)-exact-integer?' contracts (moving 'exact-' to the front where it belongs)
svn: r10960

original commit: 2c813c53c5
2008-07-29 12:56:05 +00:00
Eli Barzilay
6bbd79d0b7 * Newlines at EOFs
* Another big chunk of v4-require-isms
* Allow `#lang framework/keybinding-lang' for keybinding files
* Move hierlist sources into "mrlib/hierlist", leave stub behind

svn: r10689

original commit: 7d50e61c7f
2008-07-09 07:18:06 +00:00
Eli Barzilay
806cd0426f * Updated browser list, mainly moving gnome-open down because it does
not handle file:// URLs with a query part.
* Removed unused argument to `browser-run'
* Made `browser-run' wait just a little in case we get an error
  message from the subprocess (to avoid plt-help from exiting
  immediately)

svn: r10095

original commit: f0e71a0c1c
2008-06-02 23:34:25 +00:00
Eli Barzilay
a9acd2b5a3 reformatting
svn: r9853

original commit: 0d41afdb6d
2008-05-15 16:55:15 +00:00
Matthew Flatt
8083829c5e clean up file/gif vs. net/gifwrie confusion
svn: r9848

original commit: 02485e1e50
2008-05-15 15:54:44 +00:00
Matthew Flatt
e82eaf4ccd proprocessor doc, merge scribblings and doc-categories fields
svn: r9414

original commit: a26b334c67
2008-04-23 00:20:25 +00:00
Matthew Flatt
25639e8fa5 xml docs
svn: r9321

original commit: 9ca65af282
2008-04-15 16:46:43 +00:00
Matthew Flatt
5117b92673 net docs finished
svn: r9317

original commit: 8284b3ab15
2008-04-15 14:13:10 +00:00
Matthew Flatt
a789e2bc7b keyword-ized plot, plot and mime docs
svn: r9304

original commit: fbfc9bf883
2008-04-14 21:26:28 +00:00
Matthew Flatt
716a4f783e more net library docs
svn: r9284

original commit: 2b5d800190
2008-04-13 15:44:10 +00:00
Matthew Flatt
3a067e9495 more net docs
svn: r9279

original commit: 85583d4ebb
2008-04-13 03:07:56 +00:00
Matthew Flatt
a37ecf0b23 net/url and tests fixes for windows
svn: r9249

original commit: 2dc02d81fe
2008-04-11 01:12:01 +00:00
Matthew Flatt
8e59e04b24 change -q to config option, fix unlikely race condition in wake-on-signal, add path->url and url->path, and adjust URL parsing
svn: r9239

original commit: 0153e122b7
2008-04-10 19:05:35 +00:00
Matthew Flatt
4f844dce58 scribble/srcdoc experiment in net/gifwrite
svn: r9019

original commit: dba1ddc480
2008-03-18 18:19:25 +00:00
Matthew Flatt
876d31975b fix mac sdk support; change initial namespace to not have 'module'; set up mzc --c-mods (still need docs)
svn: r8997

original commit: b64d03d932
2008-03-16 23:08:53 +00:00
Eli Barzilay
6e98f88320 revise the way setup-plt crawls over the collection trees
svn: r8860

original commit: b76390a452
2008-03-03 22:04:28 +00:00
Eli Barzilay
500974878b use new require specs in many places
svn: r8774

original commit: b1a08edd5a
2008-02-23 09:42:03 +00:00
Eli Barzilay
aab2ad2f30 use new require specs in many places
svn: r8774

original commit: b1a08edd5a
2008-02-23 09:42:03 +00:00
Eli Barzilay
afca02b65f add #:indent to verbatim
svn: r8707

original commit: 6f0ce91461
2008-02-18 20:01:23 +00:00
Eli Barzilay
0972f7505c use @verbatim{...}
svn: r8699

original commit: 9c77909710
2008-02-18 10:49:20 +00:00
Eli Barzilay
eb0532306e * Changed setup-plt to compile collections if they have an "info.ss"
file.  (That is, it does not require the file to have a `name'
  entry.)

* The name shown when setup works is the directory name, followed by
  the `name' field from the info file when specified.

* This means that many `name's are no longer needed, so I'm removing
  them.  To see if you need a `name' entry, consider that the name
  will be shown like this:
    ... foo (<your name here>)
  This means that if the name is the same as the directory name, then
  there is no point in having it.  I also removed cases where the name
  differed only in its capitalization for collections where the case
  is obvious.

* Also, for subcollections, the name should clarify the name of the
  subcollection in context.  For example "Acknowledgments" explains
  what scribbling/acks is, but there's no need to add the context name
  as in "Scribblings: Acknowledgments".

* There may also be a point in keeping names for other uses.  One such
  example was in games, where the name field was used in the PLT Games
  application.  (This was changed to default on the directory name, so
  it is no longer needed in most games.)  Another example is in planet
  packages.

svn: r8629

original commit: 699c40643d
2008-02-12 10:33:01 +00:00
Eli Barzilay
b3de60d674 add -U to avoid compiling user-specific collects
svn: r8590

original commit: 6b48a31ffb
2008-02-08 19:54:42 +00:00
Eli Barzilay
708357dafc typos
svn: r8589

original commit: c693c49767
2008-02-08 19:53:30 +00:00
Eli Barzilay
c44e2cea9e much improved search, extended and fixed sendurl, string-based rendering for xrefs
svn: r8577

original commit: 7539945a3d
2008-02-08 04:32:49 +00:00
Eli Barzilay
a2320e7bd8 switched info.ss files to #lang
svn: r8532

original commit: 3c72e71e24
2008-02-04 23:00:35 +00:00
Eli Barzilay
98e7107573 "fix" the windows problem, yet again
svn: r8472

original commit: bc32b85ae4
2008-01-30 02:51:46 +00:00
Eli Barzilay
cc5ca119f8 * Added send-url/file that consumes a path and adds the file://, use
that in places that show docs.

* Made send-url quote characters that are possibly dangerous for
  subprocesses (good uses should call it wil already quoted urls).
  Also a keyword argument that can disable this, if someone really
  wants to.

* IE7 bug workaround finally working (but will need to switch from
  regedit to mred, to avoid vista warning).

svn: r8467

original commit: dbd27dafc6
2008-01-29 21:38:27 +00:00
Eli Barzilay
fdd76454d9 better url quoting
svn: r8457

original commit: 9b4b838b5f
2008-01-29 02:55:55 +00:00
Eli Barzilay
abdb9918fe Re-hack Windows send-url around the IE7 bug
svn: r8456

original commit: 09ec3eddbd
2008-01-29 02:22:07 +00:00
Eli Barzilay
9b4f372c3a better process helper, quote characters that might cause problems with shell quotes
svn: r8455

original commit: c2c950a2b9
2008-01-29 02:05:40 +00:00
Eli Barzilay
526f33ab6b typo
svn: r8449

original commit: 4e1f45c9a0
2008-01-28 16:51:51 +00:00
Eli Barzilay
e8aee3d9a7 svn: r8448
original commit: 6d9b4a1ed6
2008-01-28 16:45:11 +00:00
Eli Barzilay
07db7e777d avoid the extra shell on osx
svn: r8447

original commit: 9a34a06070
2008-01-28 16:36:42 +00:00
Eli Barzilay
d93d687e0e finally improved and updated sendurl on unix
svn: r8445

original commit: 8792c4ca95
2008-01-28 16:00:16 +00:00
Eli Barzilay
188d033252 separate functions for each platform, simplifies code
svn: r8443

original commit: 3942c9d275
2008-01-28 09:40:28 +00:00
Eli Barzilay
34bf7f52a0 fix some typos, remove unused 'plt option, move test so there's no internal definition
svn: r8442

original commit: 073ca0d558
2008-01-28 09:17:05 +00:00
Eli Barzilay
88a4e688bf switch to scheme/base
svn: r8441

original commit: 21ffab3fe3
2008-01-28 08:38:12 +00:00
Matthew Flatt
7678dce81b clean out _loader compilation support; merge compiler library docs into mzc manual; improve mzscheme cmdline handling so that configuration options do not cancel defaults like -i and -u
svn: r8432

original commit: e35c94f91d
2008-01-27 14:20:42 +00:00
Eli Barzilay
50108948b0 remove the now-redundant main-doc option
svn: r8288

original commit: fff894d710
2008-01-11 02:29:49 +00:00
Matthew Flatt
596f8380ba move doc sub-dirs to scribblings sub-dirs
svn: r8281

original commit: b76aa843ab
2008-01-10 20:07:32 +00:00
Robby Findler
067b2a2f25 made send-url's result type always be the same
svn: r8235

original commit: 80c22a541d
2008-01-06 14:04:46 +00:00
Matthew Flatt
0e8e8692a6 3.99.0.9: binding links in docs use nominal import sources
svn: r8196

original commit: 7fc41024c0
2008-01-03 19:07:02 +00:00
Matthew Flatt
a15e4c8b84 change Scribble to complain about colliding tags
svn: r8025

original commit: fd1de94a48
2007-12-16 03:10:00 +00:00
Matthew Flatt
f404932b10 doc scribble/xref, and start net docs
svn: r8021

original commit: bfecd9e0f5
2007-12-15 23:36:23 +00:00
Matthew Flatt
ea42dbd423 try to make send-url work with URLS containing fragments under Windows
svn: r7993

original commit: f281705054
2007-12-13 17:20:01 +00:00
Matthew Flatt
832a30bfb4 add gnome-open browser option
svn: r7980

original commit: c65c51739a
2007-12-12 22:43:15 +00:00
Matthew Flatt
7ca4d19282 use osascrip tinsteda of open to open a URL in Mac OS X
svn: r7977

original commit: 6c2e8deee2
2007-12-12 21:07:25 +00:00
Matthew Flatt
2d53c7cfb8 add --no-planet option to setup-plt
svn: r7957

original commit: 487a71bf0d
2007-12-11 13:19:23 +00:00
Matthew Flatt
755a287571 v3.99.0.2
svn: r7706

original commit: 39cedb62ed
2007-11-13 12:40:00 +00:00
Matthew Flatt
553733c465 v3.99.0.2
svn: r7706

original commit: 39cedb62ed
2007-11-13 12:40:00 +00:00
Matthew Flatt
34fe3cea91 371.2
svn: r7263

original commit: e4cbc4e6a9
2007-09-02 17:39:32 +00:00
Robby Findler
8a091a5d77 fixed PR 8870
svn: r7096

original commit: 1e648f350f
2007-08-14 05:06:08 +00:00
Eli Barzilay
9b958bd56a changed default current-alist-separator-mode to amp, added semi-or-amp mode
svn: r7057

original commit: 0e2a1a465a
2007-08-08 15:30:03 +00:00
Noel Welsh
f14fa1aaab Wrap a parameter/c contract around current-proxy-servers, so it may be used in calls to parameterize. Add test for same.
svn: r7030

original commit: 39d78f3fbf
2007-08-06 13:58:22 +00:00
Eli Barzilay
ab755d6138 PR8809 (value-less keys in the query parts) -- see message in the PR log
svn: r6931

original commit: 418df561e7
2007-07-18 03:42:23 +00:00
Eli Barzilay
a578b3cfa6 fix dangling quote
svn: r6906

original commit: d7e79cde81
2007-07-13 16:52:01 +00:00
Jay McCarthy
6f145ee624 PR8792
svn: r6905

original commit: 816d216862
2007-07-13 12:07:46 +00:00
Matthew Flatt
e4ad919f65 add missing path->complete-path for unix/windows bundle-directory
svn: r6371

original commit: 73a913f63f
2007-05-29 11:45:44 +00:00
Eli Barzilay
a79b32c87b removed redundant check
svn: r6198

original commit: 091e7c0673
2007-05-10 23:23:47 +00:00
Eli Barzilay
42c11db0ff minor edits
svn: r6195

original commit: 234a617835
2007-05-10 22:03:05 +00:00
Eli Barzilay
3c2a10cc05 better code layout, added firefox
svn: r6190

original commit: f10c3c8acf
2007-05-10 17:45:21 +00:00
Eli Barzilay
df196343cb fix detection of OSX
svn: r6189

original commit: 83f2bdce62
2007-05-10 17:07:15 +00:00
Eli Barzilay
1aa9eabee4 removed old macos classic code
svn: r6188

original commit: b0ead7f2d6
2007-05-10 16:10:03 +00:00
Matthew Flatt
a148d4e547 test and fix hook for create-embedding-executable
svn: r6036

original commit: 6afb79188d
2007-04-25 00:43:51 +00:00
Matthew Flatt
948669c76e doc correction, and expand paths before passing them on the command line
svn: r6017

original commit: b4ad09c116
2007-04-22 21:33:56 +00:00
Matthew Flatt
db3fe62e39 369.10
svn: r6003

original commit: a45251d272
2007-04-20 01:16:15 +00:00
Eli Barzilay
aa04fe03f3 URL parsing is closer to the RFC now
svn: r5965

original commit: e885e79295
2007-04-17 11:56:20 +00:00
Eli Barzilay
7de7d761ff tests for using colons in scheme-less paths
svn: r5959

original commit: ee91e07ee3
2007-04-17 06:11:39 +00:00
Eli Barzilay
317337e409 fix FSF address
svn: r5911

original commit: 8ecd7a93c9
2007-04-10 17:59:38 +00:00
Eli Barzilay
dc9a0507f5 more reformatting, fix bug (library-subpath is a path)
svn: r5722

original commit: ec7d6f88fd
2007-03-03 08:47:33 +00:00
Eli Barzilay
53e4c2b0aa some reformatting, use kw instead of opt-lambda
svn: r5721

original commit: 625db9b469
2007-03-03 08:25:38 +00:00
Eli Barzilay
0237eb4442 no need for string->immutable-string when creating exceptions
svn: r5372

original commit: 19c33a8e2a
2007-01-17 01:18:50 +00:00
Eli Barzilay
3996eefb9a parse url schemes properly (some test reformatting)
svn: r5241

original commit: 9984b48d88
2007-01-07 09:09:27 +00:00
Matthew Flatt
6b33e9615e unit clean-up
svn: r5160

original commit: 7b13755dad
2006-12-22 01:26:58 +00:00
Eli Barzilay
df4458f899 more formatting etc
svn: r5048

original commit: 680c0f419a
2006-12-06 21:44:21 +00:00
Eli Barzilay
c276d448fe formatting etc
svn: r5045

original commit: f17f7bc479
2006-12-06 21:23:38 +00:00
Eli Barzilay
44098e1093 merged units branch
svn: r5033

original commit: 3459c3a58f
2006-12-05 20:31:14 +00:00
Eli Barzilay
e6fc4d4027 merged units branch
svn: r5033

original commit: 3459c3a58f
2006-12-05 20:31:14 +00:00
Jacob Matthews
7cc0a1760d Added a test suite for net/cookie.ss, and fixed some bugs revealed by that test suite
svn: r5010

original commit: 7c7ada4514
2006-12-03 00:02:40 +00:00
Eli Barzilay
4d097b7bfc better use of regexps
svn: r4931

original commit: a024df75fb
2006-11-23 04:44:25 +00:00
Jay McCarthy
067dc55727 pr8270
svn: r4368

original commit: 800a810dfd
2006-09-18 17:33:17 +00:00
John Clements
4b36ecd467 a few more tests
svn: r3907

original commit: 105c6830be
2006-07-31 14:47:28 +00:00
John Clements
d5aa14a5bd added tests for head.ss, incl. bytes-type tests where applicable
svn: r3905

original commit: 47c2b6d511
2006-07-31 14:30:09 +00:00
Eli Barzilay
045d90b85b * made quiet.ss show real errors properly (tricky...)
* the exit code of quiet.ss is now 1 for failed tests, 2 for an
  unexpected error, and 3 for a timeout
* added net.ss and uni-norm.ss to all.ss
* uni-norm.ss will retrieve the test file if it doesn't find it
* it will also throw an error if it cannot retrieve proper tests

svn: r3662

original commit: 55619b853e
2006-07-09 05:32:41 +00:00
Eli Barzilay
f970162284 Better output: using quiet.ss will show nothing except for section
headers and errors (if any).  Also, using quiet.ss will exit with an
error code if there were errors.

svn: r3655

original commit: bbf54efde9
2006-07-07 23:46:35 +00:00
Matthew Flatt
7af0ccb668 new support file for make-executable tests
svn: r3392

original commit: 8d3d7b10d3
2006-06-18 02:00:13 +00:00
Matthew Flatt
0f76b637db improved create-executable test suite, fix for Mac OS X MrEd executable with given collection path
svn: r3391

original commit: cb7c823206
2006-06-18 01:58:29 +00:00
Matthew Flatt
311bc577fc new Create Executable in DrScheme
svn: r3178

original commit: 09d6dd95cf
2006-06-02 11:52:48 +00:00
Eli Barzilay
86dc2640bc Tests for different file:// parsing of URLs
svn: r3111

original commit: ce92ae725a
2006-05-29 18:13:33 +00:00
Eli Barzilay
3fe714427c hex encodings are uppercase according to RFC3986
svn: r3102

original commit: 0a6b673df6
2006-05-29 04:30:46 +00:00
Matthew Flatt
e0455bc329 301.16
svn: r3040

original commit: d034f64dd2
2006-05-24 19:29:58 +00:00
Matthew Flatt
cb4f6b5e6e add --multi mode for -o/-g
svn: r2888

original commit: 2e944e3e2e
2006-05-09 16:58:37 +00:00
Matthew Flatt
25540a9279 301.13 (the beginning of the end for PLTHOME)
svn: r2740

original commit: 1d77707ef1
2006-04-23 02:36:55 +00:00
Robby Findler
db3d3052bf PR 7976 fixed
svn: r2473

original commit: e2d053bac1
2006-03-21 02:11:14 +00:00
Robby Findler
8d3c0e6665 updated many unions to or/c's
svn: r2061

original commit: fddb1fa862
2006-01-31 19:17:33 +00:00
Robby Findler
772b263eb3 fixed up file: urls and fixed a bug in the parsing of urls with empty string host names
svn: r1779

original commit: aa5d3f7378
2006-01-07 03:25:26 +00:00
Robby Findler
1a8d0070b7 fixed url code in various ways
svn: r1752

original commit: c6992e0307
2006-01-03 14:02:25 +00:00
Robby Findler
18ac669ebc fixed PRs 7783 7785
svn: r1731

original commit: 00d989a80a
2005-12-31 14:23:49 +00:00
Matthew Flatt
2e9d470935 many repairs to Create Executable...
svn: r1558

original commit: d9bad21ca2
2005-12-07 14:27:12 +00:00
Matthew Flatt
bdd9fc9b2f 3m and mzc
svn: r1353

original commit: 58b6198fa5
2005-11-19 16:19:42 +00:00
Matthew Flatt
b69a2ea5b8 improved file dialogs for mac os x, changed create-executable interface, and fixed parsing of infix dots to require a delimitter after the second dot
svn: r1000

original commit: 5c1a331d3b
2005-10-06 15:54:38 +00:00
Matthew Flatt
6a81603ede URI query tags case-sensitive
svn: r262

original commit: de84c91d1a
2005-06-28 19:57:19 +00:00
Matthew Flatt
6a82852338 .
original commit: 5ebf6026625d2a02f8d5c28d1dd62c3bbc467d37
2005-03-30 17:15:45 +00:00
Matthew Flatt
c922f1be91 .
original commit: 13e7d0e72325c6baf53af7a38c65dd39104bea9c
2005-02-12 03:58:36 +00:00
Jacob Matthews
fc4358a088 Added compile-directory-zos
original commit: 7553204899c249d41707cd30644e26be343fae81
2005-02-03 15:21:12 +00:00
Jacob Matthews
4ba4bc9a9a Added support for planet files by internally reorganizing setup-unit:
the cc structure once represented a collection to be compiled; now it
represents a directory to be compiled, with different ways of constructing
a cc applying to libraries and collection paths.

original commit: 56358bed791e23498e841586da0bb0901bbe0c2f
2005-02-03 14:24:22 +00:00
Robby Findler
868d42f2a8 .
original commit: 67aec70f5bbfc29b6469303c5aac4ba9bcb87727
2004-12-22 21:22:22 +00:00
Robby Findler
c409780dd7 .
original commit: b8579d5187ee0e3bcd0b0381716777585012dee7
2004-12-18 02:34:23 +00:00
Matthew Flatt
79ae709d16 .
original commit: d34ff0a7930e4e32a623e326e79bec087e3db531
2004-10-20 13:13:33 +00:00
Adam Wick
b227a832d0 false? --> false/c
original commit: e7480a643c55920c72f06e41ec983de83b042252
2004-10-19 20:00:54 +00:00
Matthew Flatt
6cec0bd74d .
original commit: 7238f06a9482b75ca6714d59e1e58e3393baa5df
2004-10-16 16:26:12 +00:00
Matthew Flatt
b087b10700 .
original commit: 6df12c17304c3a139157e67a0067694aef5d587a
2004-10-16 16:03:03 +00:00
Matthew Flatt
a10cebff2e .
original commit: 3044c9a11598f23f13b14764d441124815d71d55
2004-10-16 16:01:00 +00:00
Matthew Flatt
9d4deab7b5 .
original commit: 40054e84125e6a57fbd8d49eb43abb606841a911
2004-10-16 14:34:08 +00:00
Matthew Flatt
bd5e284145 .
original commit: dfa1a3dd98fbd43f3476fd4dc4327b583d632c27
2004-10-16 14:26:06 +00:00
Matthew Flatt
8030d5c63b .
original commit: 496cc6747d89286ee1b25ff0412f651ba8e56b9e
2004-10-16 12:34:06 +00:00
Matthew Flatt
b1c4a712a8 .
original commit: a6c84c07ea3523f048e7e75353df0dab156f5f09
2004-10-14 18:37:21 +00:00
Matthew Flatt
dff35f8603 .
original commit: 266a43bafffc8738446b98dcf7c9b29f145922c8
2004-10-09 20:02:01 +00:00
Robby Findler
89b0be8e87 .
original commit: 4b7cac67f8e17f37b3098415fc86e130d4b40264
2004-10-08 21:50:18 +00:00
Matthew Flatt
e2730ac136 .
original commit: 3e00c5e728058e06395f24f1c619b0e149902150
2004-10-08 19:32:38 +00:00
Matthew Flatt
943232f7ca .
original commit: 3b1018398c1fe7ffd6732491b7f944ae7d30df21
2004-10-06 20:27:13 +00:00
Robby Findler
bd53af6570 .
original commit: 805f80b1e46f4bac88a6749d1900e0c6cfc638c1
2004-10-05 02:18:56 +00:00
Matthew Flatt
8fb66d6b82 .
original commit: 4313c2bbb11045726515cddab861a90451e2d81e
2004-09-10 00:26:40 +00:00
Matthew Flatt
8c7451273e .
original commit: 8750db0ba565bca8b48eeb8e6fcbf2df9c622fc3
2004-09-10 00:21:13 +00:00
Matthew Flatt
0eb3014db9 .
original commit: 4b39999335910713785cb515f42be7b8704ad844
2004-09-09 22:43:55 +00:00
Matthew Flatt
eff2d15f62 .
original commit: c67315a636365261e628c9d84ac510fbfe30b1a6
2004-09-08 22:04:33 +00:00
Matthew Flatt
41a8e116c7 .
original commit: a9a35577fecee30137f90f515bb40f640cf35a88
2004-09-07 13:06:35 +00:00
Matthew Flatt
147b3ed23e .
original commit: 4eb62470b4c8c58b9a65d58634358abc3f962a89
2004-09-07 12:47:18 +00:00
Matthew Flatt
6d9886f436 .
original commit: 77566789cee6d53331f69c6ccbf4a826d119f768
2004-08-24 16:25:06 +00:00
Robby Findler
8ebd6ff0da .
original commit: 79909a1a86679609176fca500c160c28fb65e5be
2004-08-21 05:50:40 +00:00
Robby Findler
800aed2f82 .
original commit: b751948c1d6b391cdfee4f8d48c5ef697930787d
2004-08-19 01:55:44 +00:00
Matthew Flatt
0a0ab9fcd8 .
original commit: ba5ffdfd07098e0856a3f157f003feb6e0b2b734
2004-08-17 22:13:16 +00:00
Matthew Flatt
db092b517c .
original commit: 8e2844445a140fbb519342140924b37c4855a7b0
2004-06-27 13:44:29 +00:00
Matthew Flatt
047cde58e9 .
original commit: 0fd01393ee41c65cff6c96a97ea5248b04236e0a
2004-05-11 13:13:10 +00:00
Matthew Flatt
e0eb397a87 .
original commit: 59f7f8c9a04c804ebefefaf969a9e017bd29e970
2004-04-30 15:40:34 +00:00
Robby Findler
9a770b7dbe .
original commit: 41b2d831b9f4764d759b1630ab2c6d7dfcdb58bd
2004-04-29 22:54:11 +00:00
Robby Findler
6b82080917 .
original commit: 71b026d8e69ce6b44e0d9150c90f095ea6f2641e
2004-04-21 19:20:10 +00:00
Matthew Flatt
6fe4561fa3 .
original commit: 28442ed79b360ffd8dac05393c3547e544b05df7
2004-04-15 01:00:12 +00:00
Robby Findler
a1d43601c2 .
original commit: 452b4a2f208d1537aa707936d38c2c5f1e1af87c
2004-04-04 14:49:09 +00:00
Robby Findler
c87684a141 .
original commit: 1bb504e64b4e8d26f80db774d624c3273925e3fb
2004-04-03 23:56:51 +00:00
Robby Findler
41243281d4 .
original commit: 282f99491878fb8b3fc512a0e3217c1ec67027ae
2004-03-21 02:37:42 +00:00
Robby Findler
b80094cf12 .
original commit: b8cd7098bf7f453ca03cf2e65d0eb140eecd5711
2004-03-20 17:18:24 +00:00
Matthew Flatt
9107f0c35d .
original commit: e8b1a97158ca6a6720423c96888191da08c51303
2004-03-14 19:27:23 +00:00
Matthew Flatt
cedf20de42 .
original commit: 20af79513911f5b3a4999b88845345240c511b2c
2004-02-20 03:22:25 +00:00
Matthew Flatt
dceefe60b7 .
original commit: 8ce11627dc7aa32453bdc564d8134d6a2a242ee4
2004-02-19 20:35:34 +00:00
Matthew Flatt
ab0ec8ef5d .
original commit: 399914bda290b094aaa05a92107f4e4969f446bd
2004-01-14 17:02:01 +00:00
Eli Barzilay
d9361d5a4a ppc-macosxonx -> ppc-darwin
original commit: 414111b629881847238346a158f17766674ba82c
2003-11-24 17:11:00 +00:00
Matthew Flatt
8fae6f71f0 .
original commit: 2d20748107b752704a44294b0b2b115176ec4e9a
2003-10-16 11:49:01 +00:00
Matthew Flatt
91bd1cc28d .
original commit: 4a7a5ca6f8d0826d9a379bd68278a0c095dd469d
2003-07-18 18:44:24 +00:00
Matthew Flatt
a0c6174868 .
original commit: f679606ba8c40ccbf28909c2f3fd5e16f69b3e89
2003-07-10 20:16:56 +00:00
Noel Welsh
30ac911898 Add cookie and uri-code code from Schematics and update docuementation accordingly
original commit: 254623134bcb533f0b4c8fedada4dccc219f4248
2003-04-25 15:04:32 +00:00
Matthew Flatt
e165e6b726 .
original commit: b1e6452c738c5927ea55f968d26db0d232e5c180
2003-04-23 16:38:13 +00:00
Matthew Flatt
e8da143d93 .
original commit: 506cf3fccc2896c12337087016b7f9923341a806
2003-04-17 17:32:09 +00:00
Matthew Flatt
c41bad8dd4 .
original commit: b5317355c440b20bec34ea7850beba84b52a425d
2003-04-07 21:01:11 +00:00
Matthew Flatt
d3d5f84bf6 .
original commit: 8fa7e2b175c0c7a5ed6501c1fa175f62eefa5360
2003-03-14 14:04:36 +00:00
Matthew Flatt
bf7e031403 .
original commit: fba5eb9251b3fb98cbd8f76ee299b0a9a83914f3
2003-01-14 13:52:01 +00:00
Matthew Flatt
e24ab2158d .
original commit: 77e5a9212e4e76382f0cadb82cf61e743927947b
2002-10-11 19:10:46 +00:00
Matthew Flatt
cbcda73036 .
original commit: 6791883b622fdb29a1e6cfee35aa5f014bf4b8bf
2002-10-10 15:03:04 +00:00
Paul Graunke
b8aaed8f42 internal browser support
original commit: 5d0d8f1d417176b2ebb28b7f5435fc89783f7790
2002-09-20 17:20:25 +00:00
Paul Graunke
866e43cf4c .
original commit: d078ca7828baa6f57f816366ddd3e6d88b88930d
2002-09-13 20:09:37 +00:00
Paul Graunke
d84fccb4f0 .
original commit: c3b8a997fe5fecaebc5bdf66f3bcea8c89036be0
2002-09-06 19:44:46 +00:00
Paul Graunke
f8aa46a859 .
original commit: 0ddcf321358b488cc72258d20c236bcc45251b74
2002-09-06 18:35:02 +00:00
Paul Graunke
0e1ca2f6e6 custom browsers
original commit: 9fd8695063c3aeab2143ed3be1128f394be44649
2002-08-24 15:54:15 +00:00
Robby Findler
067bdd3100 ..
original commit: 1b119792dba1b33fbcd2336b771e56433bcf2181
2002-08-23 22:50:49 +00:00
Robby Findler
145f4efec6 ..
original commit: fa01be1e36ead0391c9fddfd5cc6cbf3146276a0
2002-08-21 21:34:07 +00:00
Robby Findler
11066aa53d ...
original commit: cfa23802335d6008cfecf57406d9e1cb1ce9524f
2002-07-29 05:50:17 +00:00
Paul Graunke
f3a3cd6605 *** empty log message ***
original commit: bcdac75025c1d8a9b869b39acbf4223b10e6e59d
2002-07-26 00:51:16 +00:00
Matthew Flatt
dbbed8f02c .
original commit: 8f247a6b6336687198bcc7fcbf00f14158f89b78
2002-07-25 17:37:57 +00:00
Matthew Flatt
d6b1760d68 .
original commit: 57f20a123d9b8863400b5be181b0990b0c6d2f42
2002-07-24 19:29:17 +00:00
Matthew Flatt
5b9c560b66 .
original commit: a658fb078bc5be92ffb40d494d8587d3eae68e62
2002-07-24 17:38:21 +00:00
Paul Graunke
f3889f341e prompts user for browser preferences
original commit: 6656dbe6a2d30a393c22d9f8ccce4f709786ed22
2002-07-15 16:22:48 +00:00
Matthew Flatt
f3a76d6851 .
original commit: 25afbe47245d9e6249901bdb374eccad5d941f0e
2002-07-09 21:17:14 +00:00
Paul Graunke
04a3da9994 fixed error reporting
original commit: 7ab9526c21855ab623ee427bfdb94cd6c90e68e6
2002-07-09 20:25:37 +00:00
Paul Graunke
3b38ee00be put netscape before mozilla for matthias
original commit: 2105ed67aec70d37ee57e677611cecaf7275ddb4
2002-07-09 20:09:54 +00:00
Paul Graunke
95da566d39 .
original commit: 229f111b17e7b1419eaf8f667a89fc1137f9ad00
2002-07-09 19:32:11 +00:00
Paul Graunke
b0ce6ac5b0 added galeon support (I hope it works) based on Neil W. Van Dyke's code.
original commit: 7fc3ca807a94a48daff0dd3c22947eba5cd47011
2002-07-09 19:17:15 +00:00
Matthew Flatt
9c6da083e4 .
original commit: 2bfdfedacaa0fd044ca6198ebb8074d61fd38b6a
2002-07-07 19:37:36 +00:00
Matthew Flatt
bd8a40ca73 .
original commit: a255af5680643ffa33d095df4643d37fef5d04ff
2002-07-05 13:33:12 +00:00
Paul Graunke
619a309d1b abstracted finding which browser to use a little
added mozilla support

original commit: cf59ff8eac8a0fab7c34775d1b79dce5242bc5a8
2002-07-03 18:34:11 +00:00
Matthew Flatt
61a6fdeeeb .
original commit: fb9a90c6ebca0060a7daa9999f9b31234325f539
2002-06-11 12:50:28 +00:00
Matthew Flatt
deca828ba6 .
original commit: 9d4757929de69f128293dcf3152e87d3f062ae60
2002-06-07 12:49:14 +00:00
Robby Findler
b64702832b ..
original commit: 6bd6189f11980d73a822fa8497ceb6cfdb2f8154
2002-06-04 03:20:01 +00:00
Robby Findler
6816de50a4 fixed macos x version to use appleevents
original commit: a5f2c5477efb323219e35c52bc775544c363f746
2002-06-04 02:39:36 +00:00
Robby Findler
d30eb0f299 ..
original commit: 30b41a98d4d25dbb6c98993b5fa82c0d94ddb6bb
2002-04-24 03:28:08 +00:00
Robby Findler
04ecdd4281 added support for dillo for us poor macosxonx users with no system-able browser
original commit: b9a243ed98e8a0b334ee48094194a2516d4a59ce
2002-04-24 03:24:45 +00:00
Matthew Flatt
33f070b826 .
original commit: 320d57608949cf51ca008358f995a371ef5164c2
2002-04-21 16:23:41 +00:00
Matthew Flatt
b6429f88a7 .
original commit: 1d5fe689e3ade50052193439163382bbc4135aa0
2002-04-21 15:49:52 +00:00
Paul Graunke
2f956ee531 Eliminated flashing shell prompt under windows.
original commit: f642e5abc98afb79702a62214f039a8a6dacc9a6
2002-04-05 17:32:36 +00:00
Matthew Flatt
426582117c .
original commit: f24911554ea76b4221eb0aab49a2c9a084465c7c
2002-03-13 22:53:38 +00:00
Robby Findler
ae621ddd83 ..
original commit: 5326de1baf4601f4a8b9260ce80b24707e4a62d8
2002-03-04 18:10:53 +00:00
Paul Graunke
549c0585aa I eliminated junk output from browser that looked ugly and interacted poorly
with DrScheme's IO.

I also fixed the way ports are closed so netscape on ccs.neu.edu works.

original commit: 17adf03ccc4f3150fed816ffb47f708435c791ac
2002-02-15 17:44:47 +00:00
Matthew Flatt
f45a994a2a .
original commit: 471b1ea0a9e79703c1dd44855caca6bfde30df50
2002-02-14 17:49:10 +00:00
Matthew Flatt
f1bdba38c9 .
original commit: 42c4b63ce6f71bd6f0be1ae100c4085a132f1b8b
2002-02-14 15:29:49 +00:00
Matthew Flatt
f577617b2d .
original commit: f93afffdc888a77312b57435956c5ec3014f024c
2002-02-13 21:39:24 +00:00
Matthew Flatt
37a0969025 .
original commit: ebe32a3daa3d375c8b6e89ec9ac14a476fa713e9
2002-02-13 16:31:43 +00:00
Matthew Flatt
6873e8698a .
original commit: 9bc7798466eea7038de54c2b972b3349bae71a2e
2002-02-12 16:49:19 +00:00
Robby Findler
3b96f6069f made opera open a new subwindow
original commit: a885a7d8887bdf05f755e27a7cefa7578d251390
2002-01-15 14:16:17 +00:00
Matthew Flatt
05b3a0cab1 .
original commit: f64490b81c7cb4661eb1f72ebbae059cd07871a4
2001-12-20 17:36:11 +00:00
Matthew Flatt
a450ad9490 .
original commit: a3eab9a326f21868480e50cf631aeb9a08fc1ec8
2001-12-16 18:29:03 +00:00
Matthew Flatt
6f5839998d .
original commit: c80d7eedc4344a9046f0f2203f2f8121203090a8
2001-12-16 18:24:26 +00:00
Matthew Flatt
0535cf3a07 .
original commit: bd95838e0bceb14923f286ece768a550f4054f96
2001-12-13 00:31:26 +00:00
Matthew Flatt
139f8c8e15 .
original commit: 00fe47d759f949e4e89a80ce49745428ba6c2c56
2001-12-11 13:50:43 +00:00
Robby Findler
f572bc2262 added opera as first choice under unix
original commit: f2b1feff4945d973fb079af7d306edd4f1f0d9ba
2001-11-18 18:16:51 +00:00
John Clements
576769bc3e ...
original commit: 174863d28b9cd14141603df73aee0334ffd7c2b0
2001-10-30 05:46:44 +00:00
Matthew Flatt
32cc78b2c8 .
original commit: 1f7dc0cfc45cda4d181a049246dd720cc135d67d
2001-09-13 22:42:56 +00:00
Matthew Flatt
2614f4064c .
original commit: 91dcb209a3b0f88e0589eb80de529d84ed607ed8
2001-06-08 07:42:27 +00:00
Robby Findler
558dfe6a63 ...
original commit: bcc1b678eea705081daa4d824d381aa24fd7eb7d
2001-05-08 13:22:59 +00:00
Matthew Flatt
addf8be57a .
original commit: 9527ba8a9d865033d48bc08259583cc18bc7f455
2001-05-07 21:24:33 +00:00
Matthew Flatt
fde4603d21 .
original commit: ff0081f4b2e3bc1cdc474aa4b43762edbcd3816a
2001-05-07 17:04:08 +00:00
Matthew Flatt
dcf5a21723 .
original commit: 8af871ee2c556ccd5a882f974bfe07543da5d747
2001-04-06 22:46:59 +00:00
Robby Findler
bd9415998e ..
original commit: 8de1b6fafd1e9be50505a3d0d05a6dc22e9ee9d9
2001-03-22 18:12:15 +00:00
Robby Findler
21e3121848 ...
original commit: ad623303019b1c98714ab530a17a85e8ebc33821
2001-03-22 16:59:20 +00:00
Matthew Flatt
b917d67cde .
original commit: 5af0fe07e9d33c7dc831aee179bd8bdd02f87c43
2001-02-18 05:25:49 +00:00
Matthew Flatt
fd5b880c0c .
original commit: f3ac2fc5f710dbf1e140978711cfa24411c6749b
2001-02-15 04:15:23 +00:00
Matthew Flatt
26fcef0c0c .
original commit: a7432874af0d8e8175b449832d45abee2b42fb99
2001-02-14 23:10:50 +00:00
Matthew Flatt
08e1bc7f5f .
original commit: a7432874af0d8e8175b449832d45abee2b42fb99
2001-02-14 23:10:50 +00:00
Matthew Flatt
dd45c93448 .
original commit: 8e98d4273663a0ca7c005ae170b7048da5c723f7
2001-02-13 22:07:07 +00:00
Matthew Flatt
d48c05550e .
original commit: c6c78420724ccf3c3d4c83399d56ab5eb3363cfc
2001-02-13 18:20:52 +00:00
Sam Tobin-Hochstadt
5c82f510da initial empty commit
original commit: 342561f34a1f123a138bc62d8ea4368cd2536143
2014-11-30 09:11:48 -05:00
Matthew Flatt
d5424211cb .
original commit: 2b7c3fdc298ff2796c76f81cce3129f8ea7ea2ac
2001-02-04 19:52:06 +00:00
Matthew Flatt
b59f6273b0 .
original commit: 829c62c8f612efda004a0babe3140ba7aff70167
2001-02-04 04:02:24 +00:00
Matthew Flatt
186baf4aa3 .
original commit: 3384bad85dd51d8467e75edcb4eeb9e68bce46cf
2001-02-03 04:32:15 +00:00
Matthew Flatt
1a81b3da0f .
original commit: 8e1ae82643cfca83ae3e2551b4021ad491eab668
2001-02-02 23:25:37 +00:00
Robby Findler
932f8b3bbc ...
original commit: 1f4f8cc40600597d59a6bba1b4ee6b25cfb3faf2
2000-09-08 16:30:40 +00:00
Matthew Flatt
9a59a79ac3 .
original commit: ab506c8e08bac8050e8f5f8766e067ddde08fa8f
2000-04-20 00:21:42 +00:00
Matthew Flatt
1bc83a43e6 .
original commit: 77b3349bc0112a1d21c19757d9f4b19c29465280
1999-05-19 22:19:12 +00:00
Matthew Flatt
2b8cac5a8d .
original commit: f22cb9df23dcb72d5aaf543b7056fa8604ee1f43
1999-05-19 22:05:13 +00:00
Matthew Flatt
8eb2df7295 .
original commit: 06bd9b93edfae0749258c0303f7ced20c631df7a
1999-05-13 20:12:40 +00:00
Matthew Flatt
c77d7ae67d .
original commit: 0c0de4db74ec5df0459ad43a54c9cc2b3d901003
1999-03-09 01:43:47 +00:00
Matthew Flatt
a53c5525f5 .
original commit: 20b212994dd51ecea62071565c53ad106a413332
1999-02-06 05:24:41 +00:00
Matthew Flatt
f4c9a0b4e7 unitized setup-plt
original commit: 10d45a71f2765e8ef31b3d61385d173d206f8b55
1998-11-28 04:54:42 +00:00
Matthew Flatt
2b35989012 .
original commit: a6b9a807b7287a4085058a3995ba325b406c7ef5
1998-10-13 22:38:20 +00:00
Matthew Flatt
5800483dfd .
original commit: cc9de5c6e96ecc1ce364290bb02d387b963a19a5
1998-10-03 16:16:44 +00:00
Matthew Flatt
8155b8485a .
original commit: 93c62f704093eba91fd34f5bfc22e7daa32484a2
1998-09-06 02:17:49 +00:00
Shriram Krishnamurthi
44197c8565 cgi files have better interfaces, and now support symbols in addition
to strings for binding lookups.

nntp and pop3 now use MzScheme's read-line with the 'return-linefeed
flag, which makes it behave identically across platforms.

original commit: c1673b6a975a857549fcc8b9079afcc80c030a01
1998-07-14 20:08:15 +00:00
Matthew Flatt
4ca4d82a75 separated known-variable analysis phase, added inlining
original commit: 5d7647b40bdfe8ee588490759f20388751b18c3a
1998-05-14 22:01:23 +00:00
Shriram Krishnamurthi
3b6b856e3d Changed reference to require.
original commit: 4e7de1e02313448fe93be5d1747d94ff6a0b8a1d
1998-05-09 04:03:41 +00:00
Matthew Flatt
52ea5b868a refinements to calling convention, ad hoc optimizations and primitive inlining
original commit: 979a3270e0eea63dfe933fd47dcf1f54488cb7a9
1998-05-08 21:58:38 +00:00
Matthew Flatt
3aad0a1539 reference -> require, etc.
original commit: 221d609dd7ecdfd8cf12a75cfd8ecbfcd3799972
1998-04-20 14:56:52 +00:00
Matthew Flatt
536f87f7c1 mrspidey integration
original commit: a0750d913741390cd5aec93ddb9c19cdd4e0e569
1998-03-30 19:34:50 +00:00
Matthew Flatt
bc40d08dc6 --embedded, setup-plt refinements for .plt
original commit: 9ac24a035bdba22c6212dbfff88e8c2f5b843109
1998-03-10 13:59:40 +00:00
Matthew Flatt
5df833e306 compile-plt messages
original commit: 618228baca2d95496bcaa7a60f123fc3b0f189f8
1998-03-03 19:17:19 +00:00
Matthew Flatt
a873589fdc new flags; added glue-extension; new MzLib compiler.ss flags
original commit: 7ff840ba27f1dfd981085ac4d703dee1abf47bf9
1998-03-03 16:46:36 +00:00
Matthew Flatt
cf67831cbe code unitized and interface sanitized
original commit: abdf1b56a7cf0d87cba22e2b4177b9e6398a2da4
1998-01-10 19:56:32 +00:00
Shriram Krishnamurthi
37d20338bd Initial revision
original commit: a75c6730f33f736f58191f69f33fdbcb576cdcf5
1997-11-06 18:49:45 +00:00
Shriram Krishnamurthi
598a4a009a Updated to handle separate sendmail library routines.
original commit: 3db620dd473ed784367b06aa6790304ab534fc07
1997-10-27 20:53:55 +00:00
cvs2git
f4237740b3 This commit was manufactured by cvs2git to create branch 'countdown'.
Sprout from master 1997-10-15 16:43:43 UTC Robby Findler <robby@racket-lang.org> 'Initial revision'
Cherrypick from master 1997-10-15 16:52:54 UTC Robby Findler <robby@racket-lang.org> 'Initial revision':
    collects/countdwn/README
Delete:
    collects/backward/sparamr.ss
    collects/backward/sparams.ss
    collects/cogen/ariesr.ss
    collects/cogen/ariess.ss
    collects/drscheme-jr/drscheme-jr.el
    collects/drscheme-jr/drscheme-jr.elc
    collects/drscheme-jr/drscheme-jr.ss
    collects/drscheme-jr/openbugs
    collects/drscheme/app.ss
    collects/drscheme/basis.ss
    collects/drscheme/cunit.ss
    collects/drscheme/donkstub.ss
    collects/drscheme/drsig.ss
    collects/drscheme/edit.ss
    collects/drscheme/export.ss
    collects/drscheme/face.ss
    collects/drscheme/frame.ss
    collects/drscheme/history
    collects/drscheme/icons.ss
    collects/drscheme/info.ss
    collects/drscheme/init.ss
    collects/drscheme/intrface.ss
    collects/drscheme/language.ss
    collects/drscheme/link.ss
    collects/drscheme/main.ss
    collects/drscheme/openbugs
    collects/drscheme/params.ss
    collects/drscheme/phooks.ss
    collects/drscheme/prefs.ss
    collects/drscheme/prog.ss
    collects/drscheme/rep.ss
    collects/drscheme/setup.ss
    collects/drscheme/sig.ss
    collects/drscheme/snip.ss
    collects/drscheme/spidstub.ss
    collects/drscheme/tool.ss
    collects/drscheme/tools/analysis/unit.ss
    collects/drscheme/tools/debug/unit.ss
    collects/drscheme/tools/syncheck/unit.ss
    collects/drscheme/toy.ss
    collects/drscheme/unit.ss
    collects/drscheme/zlink.ss
    collects/drscheme/zodiac.ss
    collects/graphics/TREADME
    collects/graphics/graphic.ss
    collects/graphics/graphicr.ss
    collects/graphics/graphics.ss
    collects/graphics/graphicu.ss
    collects/graphics/turex.ss
    collects/graphics/turtle.ss
    collects/graphics/turtler.ss
    collects/graphics/turtles.ss
    collects/graphics/turtlmr.ss
    collects/gusrspce/gusrspcr.ss
    collects/gusrspce/gusrspcs.ss
    collects/hierarchy/classr.ss
    collects/hierarchy/hierr.ss
    collects/hierarchy/m3r.ss
    collects/hierarchy/unitr.ss
    collects/hierlist/doc.txt
    collects/hierlist/hierlist.ss
    collects/hierlist/hierlistr.ss
    collects/hierlist/hierlists.ss
    collects/mred/autoload.ss
    collects/mred/autosave.ss
    collects/mred/canvas.ss
    collects/mred/connect.ss
    collects/mred/console.ss
    collects/mred/constant.ss
    collects/mred/containr.ss
    collects/mred/contfram.ss
    collects/mred/contkids.ss
    collects/mred/contpanl.ss
    collects/mred/cparens.ss
    collects/mred/cppmode.ss
    collects/mred/edframe.ss
    collects/mred/edit.ss
    collects/mred/exit.ss
    collects/mred/exn.ss
    collects/mred/fileutil.ss
    collects/mred/finder.ss
    collects/mred/findstr.ss
    collects/mred/frame.ss
    collects/mred/graph.ss
    collects/mred/group.ss
    collects/mred/guiutils.ss
    collects/mred/html.ss
    collects/mred/hyper.ss
    collects/mred/hypersig.ss
    collects/mred/hyprdial.ss
    collects/mred/hypredit.ss
    collects/mred/hyprfram.ss
    collects/mred/icon.ss
    collects/mred/keys.ss
    collects/mred/link.ss
    collects/mred/mcache.ss
    collects/mred/menu.ss
    collects/mred/mode.ss
    collects/mred/panel.ss
    collects/mred/paren.ss
    collects/mred/prefs.ss
    collects/mred/project.ss
    collects/mred/sig.ss
    collects/mred/sparen.ss
    collects/mred/ssmode.ss
    collects/mred/stdrs.ss
    collects/mred/stlink.ss
    collects/mred/stprims.ss
    collects/mred/strun.ss
    collects/mred/stsigs.ss
    collects/mred/testable.ss
    collects/mred/url.ss
    collects/mred/version.ss
    collects/mred/wxr.ss
    collects/mred/wxs.ss
    collects/mzlib/awk.ss
    collects/mzlib/awkc.ss
    collects/mzlib/compat.ss
    collects/mzlib/compatc.ss
    collects/mzlib/compatr.ss
    collects/mzlib/compats.ss
    collects/mzlib/compatu.ss
    collects/mzlib/compile.ss
    collects/mzlib/compilec.ss
    collects/mzlib/compiler.ss
    collects/mzlib/compiles.ss
    collects/mzlib/compileu.ss
    collects/mzlib/constan.ss
    collects/mzlib/constanc.ss
    collects/mzlib/constant.ss
    collects/mzlib/core.ss
    collects/mzlib/corec.ss
    collects/mzlib/corer.ss
    collects/mzlib/cores.ss
    collects/mzlib/coreu.ss
    collects/mzlib/date.ss
    collects/mzlib/datec.ss
    collects/mzlib/dater.ss
    collects/mzlib/dates.ss
    collects/mzlib/dateu.ss
    collects/mzlib/defstru.ss
    collects/mzlib/defstruc.ss
    collects/mzlib/file.ss
    collects/mzlib/filec.ss
    collects/mzlib/filer.ss
    collects/mzlib/files.ss
    collects/mzlib/fileu.ss
    collects/mzlib/functio.ss
    collects/mzlib/functioc.ss
    collects/mzlib/function.ss
    collects/mzlib/functior.ss
    collects/mzlib/functios.ss
    collects/mzlib/functiou.ss
    collects/mzlib/inflate.ss
    collects/mzlib/inflatec.ss
    collects/mzlib/inflater.ss
    collects/mzlib/inflates.ss
    collects/mzlib/inflateu.ss
    collects/mzlib/letplsrc.ss
    collects/mzlib/letplus.ss
    collects/mzlib/macro.ss
    collects/mzlib/macroc.ss
    collects/mzlib/macrox.ss
    collects/mzlib/match.ss
    collects/mzlib/matchc.ss
    collects/mzlib/mzlib.ss
    collects/mzlib/mzlibc.ss
    collects/mzlib/mzlibr.ss
    collects/mzlib/mzlibs.ss
    collects/mzlib/mzlibu.ss
    collects/mzlib/pconver.ss
    collects/mzlib/pconverc.ss
    collects/mzlib/pconverr.ss
    collects/mzlib/pconvers.ss
    collects/mzlib/pconvert.ss
    collects/mzlib/pconveru.ss
    collects/mzlib/pretty.ss
    collects/mzlib/prettyc.ss
    collects/mzlib/prettyr.ss
    collects/mzlib/prettys.ss
    collects/mzlib/prettyu.ss
    collects/mzlib/refer.ss
    collects/mzlib/referc.ss
    collects/mzlib/referf.ss
    collects/mzlib/sfunctor.ss
    collects/mzlib/shared.ss
    collects/mzlib/sharedc.ss
    collects/mzlib/spidey.ss
    collects/mzlib/spideyc.ss
    collects/mzlib/string.ss
    collects/mzlib/stringc.ss
    collects/mzlib/stringr.ss
    collects/mzlib/strings.ss
    collects/mzlib/stringu.ss
    collects/mzlib/synrule.ss
    collects/mzlib/synrulec.ss
    collects/mzlib/thread.ss
    collects/mzlib/threadc.ss
    collects/mzlib/threadr.ss
    collects/mzlib/threads.ss
    collects/mzlib/threadu.ss
    collects/mzlib/trace.ss
    collects/mzlib/tracec.ss
    collects/mzlib/trigger.ss
    collects/mzlib/triggerc.ss
    collects/mzlib/triggerr.ss
    collects/mzlib/triggers.ss
    collects/mzlib/triggeru.ss
    collects/mzlib/unitsig.ss
    collects/mzlib/unitsigc.ss
    collects/mzlib/zmath.ss
    collects/mzlib/zmathc.ss
    collects/mzlib/zmathr.ss
    collects/mzlib/zmaths.ss
    collects/mzlib/zmathu.ss
    collects/net/cgi.ss
    collects/net/cgir.ss
    collects/net/cgis.ss
    collects/net/cgiu.ss
    collects/net/nntp.sd
    collects/net/nntp.ss
    collects/net/nntpr.ss
    collects/net/nntps.ss
    collects/net/nntpu.ss
    collects/system/app.ss
    collects/system/compsys.ss
    collects/system/debug.ss
    collects/system/history
    collects/system/info.ss
    collects/system/invoke.ss
    collects/system/noconsle.ss
    collects/system/nuapp.ss
    collects/system/openbugs
    collects/system/splash.ss
    collects/system/system.ss
    collects/system/timesys.ss
    collects/tests/mred/sixlib.ss
    collects/userspce/paramr.ss
    collects/userspce/ricedef.ss
    collects/userspce/ricedefr.ss
    collects/userspce/ricedefs.ss
    collects/userspce/userspcr.ss
    collects/userspce/userspcs.ss
    collects/zodiac/back.ss
    collects/zodiac/basestr.ss
    collects/zodiac/corelate.ss
    collects/zodiac/invoke.ss
    collects/zodiac/link.ss
    collects/zodiac/load.ss
    collects/zodiac/make.ss
    collects/zodiac/misc.ss
    collects/zodiac/namedarg.ss
    collects/zodiac/pattern.ss
    collects/zodiac/qq.ss
    collects/zodiac/quasi.ss
    collects/zodiac/reader.ss
    collects/zodiac/readstr.ss
    collects/zodiac/scanner.ss
    collects/zodiac/scanparm.ss
    collects/zodiac/scanstr.ss
    collects/zodiac/scm-core.ss
    collects/zodiac/scm-hanc.ss
    collects/zodiac/scm-main.ss
    collects/zodiac/scm-obj.ss
    collects/zodiac/scm-ou.ss
    collects/zodiac/scm-spdy.ss
    collects/zodiac/scm-unit.ss
    collects/zodiac/sexp.ss
    collects/zodiac/sigs.ss
    collects/zodiac/x.ss
    collects/zodiac/zsigs.ss
    man/man1/DrScheme.1
    man/man1/drscheme.1
    man/man1/mred.1
    man/man1/mzscheme.1
    tests/mred/sixlib.ss
original commit: 96b3c4f6aa05997ef10ca7fe72ce11ea011cd352
1997-10-15 16:52:55 +00:00
Shriram Krishnamurthi
60b09c2a2c Updated location dependencies.
original commit: 8dc22890947fc79144ddceffc733997924b63bcc
1997-09-25 21:04:57 +00:00
Shriram Krishnamurthi
e339e5174b Initial revision
original commit: 5064ee2575e2eed6d99c33019a8cc8ac798d2e43
1997-09-04 16:02:27 +00:00
613 changed files with 40602 additions and 7823 deletions

View File

@ -82,8 +82,8 @@ in "<dir>/bin", packages in "<dir>/share/racket/pkgs", documentation
in "<dir>/share/racket/doc", etc.
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
"<dir>" (whichmust be an absolute path) with binaries in "<dir>/bin",
packges in "<dir>/share/pkgs", documentation in "<dir>/doc", etc.
"<dir>" (which must be an absolute path) with binaries in "<dir>/bin",
packages in "<dir>/share/pkgs", documentation in "<dir>/doc", etc.
On Windows, Unix-style install is not supported.
@ -196,7 +196,7 @@ libraries. See the documentation for `raco setup' for information on
the options.
For cross compilation, add configuration options to
`CONFIGURE_ARGS_qq="..."' as descibed in the "README" of "racket/src",
`CONFIGURE_ARGS_qq="..."' as described in the "README" of "racket/src",
but also add a `PLAIN_RACKET=...' argument for the top-level makefile
to specify the same executable as in an `--enable-racket=...' for
`configure'.
@ -212,7 +212,7 @@ If you want to install packages manually out of the "pkgs" directory,
the `local-catalog' target creates a catalog as "racket/local/catalog"
that merges the currently configured catalog's content with pointers
to the packages in "pkgs". A Unix-style build works that way: it
builds and installs minimal Racket, and then it installs packags out
builds and installs minimal Racket, and then it installs packages out
of a catalog that is created by `make local-catalog'.
To add a package catalog that is used after the content of "pkgs" but

34
README.md Normal file
View File

@ -0,0 +1,34 @@
[![Linux/Mac Build
Status](https://travis-ci.org/racket/racket.svg?branch=master)](https://travis-ci.org/racket/racket)
[![Windows build status](https://ci.appveyor.com/api/projects/status/hqir4eib0okk6xar?svg=true)](https://ci.appveyor.com/project/plt/racket)
This is the source code for the core of Racket. See
"INSTALL.txt" for full information on building Racket.
To build the full Racket distribution from this repository, run `make`
in the top-level directory. To build the Minimal Racket, run `make
base`.
The rest of the Racket distribution source code is in other
repositories under [the Racket GitHub
organization](https://github.com/racket).
Contribute to Racket by submitting a pull request, joining the
[development mailing list](https://lists.racket-lang.org), or visiting
the IRC channel.
License
-------
Racket
Copyright (c) 2010-2016 PLT Design Inc.
Racket is distributed under the GNU Lesser General Public License
(LGPL). This implies that you may link Racket into proprietary
applications, provided you follow the rules stated in the LGPL. You can
also modify Racket; if you distribute a modified version, you must
distribute it under the terms of the LGPL, which in particular states
that you must release the source code for the modified software.
See racket/src/COPYING_LESSER.txt for more information.

View File

@ -1,17 +0,0 @@
This is the source code for the main Racket distribution. See
"INSTALL.txt" for information on building Racket.
License
-------
Racket
Copyright (c) 2010-2016 PLT Design Inc.
Racket is distributed under the GNU Lesser General Public License
(LGPL). This implies that you may link Racket into proprietary
applications, provided you follow the rules stated in the LGPL. You can
also modify Racket; if you distribute a modified version, you must
distribute it under the terms of the LGPL, which in particular states
that you must release the source code for the modified software.
See racket/src/COPYING_LESSER.txt for more information.

View File

@ -16,15 +16,7 @@
(make-meta-reader
'at-exp
"language path"
(lambda (bstr)
(let* ([str (bytes->string/latin-1 bstr)]
[sym (string->symbol str)])
(and (module-path? sym)
(vector
;; try submod first:
`(submod ,sym reader)
;; fall back to /lang/reader:
(string->symbol (string-append str "/lang/reader"))))))
lang-reader-module-paths
wrap-reader
(lambda (orig-read-syntax)
(define read-syntax (wrap-reader orig-read-syntax))

View File

@ -12,7 +12,7 @@
(define collection 'multi)
(define version "6.4.0.15")
(define version "6.7.0.2")
(define deps `("racket-lib"
["racket" #:version ,version]))

View File

@ -0,0 +1,11 @@
compiler-lib
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -0,0 +1,94 @@
(module bundle-dist racket/base
(require racket/file
(only-in racket/base lambda)
racket/path
racket/system
file/zip
file/tar)
(provide bundle-put-file-extension+style+filters
bundle-directory)
(define (bundle-file-suffix)
(case (system-type)
[(macosx) "dmg"]
[(windows) "zip"]
[(unix) "tgz"]))
(define (bundle-put-file-extension+style+filters)
(values (bundle-file-suffix)
null
(case (system-type)
[(windows) '(("Zip file" "*.zip"))]
[(macosx) '(("Disk image" "*.dmg"))]
[(unix) '(("Gzipped tar file" "*.tgz"))])))
(define (add-suffix name suffix)
(if (filename-extension name)
name
(path-replace-suffix name
(string->bytes/utf-8 (string-append "." suffix)))))
(define (with-prepared-directory dir for-exe? k)
;; If `dir' contains multiple files, create a new
;; directory that contains a copy of `dir'
(if (and for-exe?
(= 1 (length (directory-list dir))))
(k dir)
(let ([temp-dir (make-temporary-file "bundle-tmp-~a" 'directory)])
(dynamic-wind
void
(lambda ()
(let ([dest
(let-values ([(base name dir?) (split-path dir)])
(build-path temp-dir name))])
(make-directory dest)
(let loop ([src dir][dest dest])
(for-each (lambda (f)
(let ([src (build-path src f)]
[dest (build-path dest f)])
(cond
[(directory-exists? src)
(make-directory dest)
(loop src dest)]
[(file-exists? src)
(copy-file src dest)
(file-or-directory-modify-seconds
dest
(file-or-directory-modify-seconds src))])))
(directory-list src))))
(k temp-dir))
(lambda () (delete-directory/files temp-dir))))))
(define bundle-directory
(lambda (target dir [for-exe? #f])
(let ([target (add-suffix target (bundle-file-suffix))])
(case (system-type)
[(macosx)
(with-prepared-directory
dir for-exe?
(lambda (dir)
(let* ([cout (open-output-bytes)]
[cerr (open-output-bytes)]
[cin (open-input-bytes #"")]
[p (process*/ports
cout cin cerr
"/usr/bin/hdiutil"
"create" "-format" "UDZO"
"-imagekey" "zlib-level=9"
"-mode" "555"
"-volname" (path->string
(path-replace-suffix (file-name-from-path target) #""))
"-srcfolder" (path->string (cleanse-path (path->complete-path dir)))
(path->string (cleanse-path (path->complete-path target))))])
((list-ref p 4) 'wait)
(unless (eq? ((list-ref p 4) 'status) 'done-ok)
(error 'bundle-directory
"error bundling: ~a"
(regexp-replace #rx"[\r\n]*$" (get-output-string cerr) ""))))))]
[(windows unix)
(let-values ([(base name dir?) (split-path (path->complete-path dir))])
(parameterize ([current-directory base])
((if (eq? 'unix (system-type)) tar-gzip zip) target name)))]
[else (error 'bundle-directory "don't know how")])))))

View File

@ -0,0 +1,91 @@
#lang racket/base
(require racket/cmdline
raco/command-name
compiler/zo-parse
compiler/decompile
compiler/compilation-path
racket/pretty
racket/format)
(define (get-name)
(string->symbol (short-program+command-name)))
(define force? #f)
(define source-files
(command-line
#:program (short-program+command-name)
#:once-each
[("--force") "Ignore timestamp mimatch on associated \".zo\""
(set! force? #t)]
[("--columns" "-n") n "Format for <n> columns"
(let ([num (string->number n)])
(unless (exact-positive-integer? num)
(raise-user-error (get-name)
"not a valid column count: ~a" n))
(pretty-print-columns num))]
#:args source-or-bytecode-file
source-or-bytecode-file))
(define (check-files orig-file alt-file)
(cond
[(not (file-exists? alt-file))
(cond
[(file-exists? orig-file)
(unless (is-bytecode-file? orig-file)
(raise-user-error (get-name)
(~a "not a bytecode file, and no associated \".zo\" file;\n"
" consider using `raco make` to compile the source file to bytecode\n"
" path: ~a\n"
" tried associated path: ~a")
orig-file
alt-file))]
[else
(raise-user-error (get-name)
(~a "no such file, and no associated \".zo\" file\n"
" path: ~a\n"
" tried associated path: ~a")
orig-file
alt-file)])]
[(not (is-bytecode-file? alt-file))
(raise-user-error (get-name)
(~a "associated \".zo\" file is not a bytecode file\n"
" original path: ~a\n"
" associated path: ~a")
orig-file
alt-file)]
[(and (not force?)
((file-or-directory-modify-seconds orig-file
#f
(lambda () -inf.0))
. > .
(file-or-directory-modify-seconds alt-file)))
;; return a warning:
(raise-user-error (get-name)
(~a "associated \".zo\" file's date is older than given file's date;\n"
" consider using `raco make` to rebuild the source file, or use `--force`\n"
" to skip the date check\n"
" original path: ~a\n"
" associated path: ~a")
orig-file
alt-file)]))
(define (is-bytecode-file? orig-file)
(call-with-input-file*
orig-file
(lambda (i)
(equal? #"#~" (read-bytes 2 i)))))
(for ([zo-file source-files])
(let ([zo-file (path->complete-path zo-file)])
(let-values ([(base name dir?) (split-path zo-file)])
(let ([alt-file (get-compilation-bytecode-file zo-file)])
(check-files zo-file alt-file)
(parameterize ([current-load-relative-directory base]
[print-graph #t])
(pretty-write
(decompile
(call-with-input-file*
(if (file-exists? alt-file) alt-file zo-file)
(lambda (in)
(zo-parse in))))))))))

View File

@ -0,0 +1,33 @@
#lang scheme/base
(require scheme/cmdline
raco/command-name
compiler/distribute)
(define verbose (make-parameter #f))
(define exe-embedded-collects-path (make-parameter #f))
(define exe-dir-add-collects-dirs (make-parameter null))
(define-values (dest-dir source-files)
(command-line
#:program (short-program+command-name)
#:once-each
[("--collects-path") path "Set <path> as main collects for executables"
(exe-embedded-collects-path path)]
#:multi
[("++collects-copy") dir "Add collects in <dir> to directory"
(exe-dir-add-collects-dirs (append (exe-dir-add-collects-dirs) (list dir)))]
#:once-each
[("-v") "Verbose mode"
(verbose #t)]
#:args (dest-dir . executable)
(values dest-dir executable)))
(assemble-distribution
dest-dir
source-files
#:collects-path (exe-embedded-collects-path)
#:copy-collects (exe-dir-add-collects-dirs))
(when (verbose)
(printf " [output to \"~a\"]\n" dest-dir))
(module test racket/base)

View File

@ -0,0 +1,155 @@
#lang racket/base
(require racket/cmdline
raco/command-name
compiler/private/embed
launcher/launcher
dynext/file
setup/dirs)
(define verbose (make-parameter #f))
(define very-verbose (make-parameter #f))
(define gui (make-parameter #f))
(define 3m (make-parameter #t))
(define launcher (make-parameter #f))
(define exe-output (make-parameter #f))
(define exe-embedded-flags (make-parameter '("-U" "--")))
(define exe-embedded-libraries (make-parameter null))
(define exe-aux (make-parameter null))
(define exe-embedded-config-path (make-parameter "etc"))
(define exe-embedded-collects-path (make-parameter null))
(define exe-embedded-collects-dest (make-parameter #f))
(define source-file
(command-line
#:program (short-program+command-name)
#:once-each
[("-o") file "Write executable as <file>"
(exe-output file)]
[("--gui") "Generate GUI executable"
(gui #t)]
[("-l" "--launcher") "Generate a launcher"
(when (or (find-addon-tethered-gui-bin-dir)
(find-addon-tethered-console-bin-dir))
;; When an addon-executable directory is configured, treat the
;; addon directory more like an installation directory, instead
;; of a user-specific directory: record it, and remove the -U
;; flag (if any)
(exe-embedded-flags
(append
(list "-A" (path->string (find-system-path 'addon-dir)))
(remove "-U" (exe-embedded-flags)))))
(launcher #t)]
[("--config-path") path "Set <path> as configuration directory for executable"
(exe-embedded-config-path path)]
[("--collects-path") path "Set <path> as main collects for executable"
(exe-embedded-collects-path path)]
[("--collects-dest") dir "Write collection code to <dir>"
(exe-embedded-collects-dest dir)]
[("--ico") .ico-file "Set Windows icon for executable"
(exe-aux (cons (cons 'ico .ico-file) (exe-aux)))]
[("--icns") .icns-file "Set Mac OS X icon for executable"
(exe-aux (cons (cons 'icns .icns-file) (exe-aux)))]
[("--orig-exe") "Use original executable instead of stub"
(exe-aux (cons (cons 'original-exe? #t) (exe-aux)))]
[("--3m") "Generate using 3m variant"
(3m #t)]
[("--cgc") "Generate using CGC variant"
(3m #f)]
#:multi
[("++aux") aux-file "Extra executable info (based on <aux-file> suffix)"
(let ([auxes (extract-aux-from-path (path->complete-path aux-file))])
(when (null? auxes)
(printf " warning: no recognized information from ~s\n" aux-file))
(exe-aux (append auxes (exe-aux))))]
[("++lib") lib "Embed <lib> in executable"
(exe-embedded-libraries (append (exe-embedded-libraries) (list lib)))]
[("++exf") flag "Add flag to embed in executable"
(exe-embedded-flags (append (exe-embedded-flags) (list flag)))]
[("--exf") flag "Remove flag to embed in executable"
(exe-embedded-flags (remove flag (exe-embedded-flags)))]
[("--exf-clear") "Clear flags to embed in executable"
(exe-embedded-flags null)]
[("--exf-show") "Show flags to embed in executable"
(printf "Flags to embed: ~s\n" (exe-embedded-flags))]
#:once-each
[("-v") "Verbose mode"
(verbose #t)]
[("--vv") "Very verbose mode"
(verbose #t)
(very-verbose #t)]
#:args (source-file)
source-file))
(let ([dest (mzc:embedding-executable-add-suffix
(or (exe-output)
(extract-base-filename/ss source-file
(string->symbol (short-program+command-name))))
(gui))])
(unless (file-exists? source-file)
(raise-user-error (string->symbol (short-program+command-name))
"source file does not exist\n path: ~a" source-file))
(with-handlers ([exn:fail:filesystem? (lambda (exn) (void))])
(call-with-input-file* dest
(lambda (dest-in)
(call-with-input-file* source-file
(lambda (source-in)
(when (equal? (port-file-identity dest-in)
(port-file-identity source-in))
(raise-user-error (string->symbol (short-program+command-name))
(string-append
"source file is the same as the destination file"
"\n source path: ~a"
"\n destination path: ~a")
source-file
dest)))))))
(cond
[(launcher)
(parameterize ([current-launcher-variant (if (3m) '3m 'cgc)])
((if (gui)
make-gracket-launcher
make-racket-launcher)
(append (list "-t" (path->string (path->complete-path source-file)))
(exe-embedded-flags))
dest
(exe-aux)))]
[else
(define mod-sym (string->symbol
(format "#%mzc:~a"
(let-values ([(base name dir?)
(split-path source-file)])
(path->bytes (path-replace-suffix name #""))))))
(mzc:create-embedding-executable
dest
#:mred? (gui)
#:variant (if (3m) '3m 'cgc)
#:verbose? (very-verbose)
#:modules (cons `(#%mzc: (file ,source-file) (main configure-runtime))
(map (lambda (l) `(#t (lib ,l)))
(exe-embedded-libraries)))
#:configure-via-first-module? #t
#:early-literal-expressions
(parameterize ([current-namespace (make-base-namespace)])
(define cr-sym (string->symbol (format "~a(configure-runtime)" mod-sym)))
(list
(compile
`(when (module-declared? '',cr-sym)
(dynamic-require '',cr-sym #f)))))
#:literal-expression
(parameterize ([current-namespace (make-base-namespace)])
(define main-sym (string->symbol (format "~a(main)" mod-sym)))
(compile
`(begin
(namespace-require '',mod-sym)
(when (module-declared? '',main-sym)
(dynamic-require '',main-sym #f)))))
#:cmdline (exe-embedded-flags)
#:collects-path (exe-embedded-collects-path)
#:collects-dest (exe-embedded-collects-dest)
#:aux (cons `(config-dir . ,(exe-embedded-config-path))
(exe-aux)))])
(when (verbose)
(printf " [output to \"~a\"]\n" dest)))
(module test racket/base)

View File

@ -0,0 +1,42 @@
#lang racket/base
(module expand racket/base
(require racket/cmdline
raco/command-name
racket/pretty)
(provide show-program)
(define (show-program expand)
(define source-files
(command-line
#:program (short-program+command-name)
#:once-each
[("--columns" "-n") n "Format for <n> columns"
(let ([num (string->number n)])
(unless (exact-positive-integer? num)
(raise-user-error (string->symbol (short-program+command-name))
"not a valid column count: ~a" n))
(pretty-print-columns num))]
#:args source-file
source-file))
(for ([src-file source-files])
(let ([src-file (path->complete-path src-file)])
(let-values ([(base name dir?) (split-path src-file)])
(parameterize ([current-load-relative-directory base]
[current-namespace (make-base-namespace)]
[read-accept-reader #t])
(call-with-input-file*
src-file
(lambda (in)
(port-count-lines! in)
(let loop ()
(let ([e (read-syntax src-file in)])
(unless (eof-object? e)
(pretty-write (syntax->datum (expand e)))
(loop))))))))))))
(require (submod "." expand))
(show-program expand)

View File

@ -0,0 +1,15 @@
#lang info
(define raco-commands
'(("make" compiler/commands/make "compile source to bytecode" 100)
("exe" compiler/commands/exe "create executable" 20)
("pack" compiler/commands/pack "pack files/collections into a .plt archive" #f)
("unpack" compiler/commands/unpack "unpack files/collections from a .plt archive" #f)
("decompile" compiler/commands/decompile "decompile bytecode" #f)
("test" compiler/commands/test "run tests associated with files/directories" 15)
("expand" compiler/commands/expand "macro-expand source" #f)
("read" compiler/commands/read "read and pretty-print source" #f)
("distribute" compiler/commands/exe-dir "prepare executable(s) in a directory for distribution" #f)
("demodularize" compiler/demodularizer/batch "produce a whole program from a single module" #f)))
(define test-responsibles '(("test.rkt" jay)))

View File

@ -0,0 +1,119 @@
#lang racket/base
(require racket/cmdline
raco/command-name
compiler/cm
compiler/compiler
compiler/compilation-path
dynext/file
setup/parallel-build
setup/path-to-relative
racket/match)
(module test racket/base)
(define verbose (make-parameter #f))
(define very-verbose (make-parameter #f))
(define disable-inlining (make-parameter #f))
(define disable-deps (make-parameter #f))
(define disable-const (make-parameter #f))
(define prefixes (make-parameter null))
(define assume-primitives (make-parameter #t))
(define worker-count (make-parameter 1))
(define mzc-symbol (string->symbol (short-program+command-name)))
(define source-files
(command-line
#:program (short-program+command-name)
#:once-each
[("-j") n "Compile with up to <n> tasks in parallel"
(let ([num (string->number n)])
(unless num (raise-user-error (format "~a: bad count for -j: ~s"
(short-program+command-name)
n)))
(worker-count num))]
[("--disable-inline") "Disable procedure inlining during compilation"
(disable-inlining #t)]
[("--disable-constant") "Disable enforcement of module constants"
(disable-const #t)]
[("--no-deps") "Compile immediate files without updating dependencies"
(disable-deps #t)]
[("-p" "--prefix") file "Add elaboration-time prefix file for --no-deps"
(prefixes (append (prefixes) (list file)))]
[("--no-prim") "Do not assume `scheme' bindings at top level for --no-deps"
(assume-primitives #f)]
[("-v") "Verbose mode"
(verbose #t)]
[("--vv") "Very verbose mode"
(verbose #t)
(very-verbose #t)]
#:args (file . another-file) (cons file another-file)))
(cond
;; Just compile one file:
[(disable-deps)
(let ([prefix
`(begin
(require scheme)
,(if (assume-primitives)
'(void)
'(namespace-require/copy 'scheme))
,@(map (lambda (s) `(load ,s)) (prefixes))
(void))])
((compile-zos prefix #:verbose? (verbose))
source-files
'auto))]
;; Normal make:
[(= (worker-count) 1)
(let ([n (make-base-empty-namespace)]
[did-one? #f])
(parameterize ([current-namespace n]
[manager-trace-handler
(if (very-verbose)
(λ (p) (printf " ~a\n" p))
(manager-trace-handler))]
[manager-compile-notify-handler
(lambda (p)
(set! did-one? #t)
(when (verbose)
(printf " making ~s\n" p)))])
(for ([file source-files])
(unless (file-exists? file)
(error mzc-symbol "file does not exist: ~a" file))
(set! did-one? #f)
(let ([name (extract-base-filename/ss file mzc-symbol)])
(when (verbose)
(printf "\"~a\":\n" file))
(parameterize ([compile-context-preservation-enabled
(disable-inlining)]
[compile-enforce-module-constants
(not (disable-const))])
(managed-compile-zo file))
(when (verbose)
(printf " [~a \"~a\"]\n"
(if did-one? "output to" "already up-to-date at")
(get-compilation-bytecode-file file)))))))]
;; Parallel make:
[else
(define path-cache (make-hash))
(or (parallel-compile-files
source-files
#:worker-count (worker-count)
#:handler (lambda (id type work msg out err)
(define (->rel p)
(path->relative-string/library p #:cache path-cache))
(match type
['start (when (verbose) (printf " ~a making ~a\n" id (->rel work)))]
['done (when (verbose) (printf " ~a made ~a\n" id (->rel work)))]
['output (printf " ~a output from: ~a\n~a~a" id work out err)]
[else (printf " ~a error compiling ~a\n~a\n~a~a" id work msg out err)]))
#:options (let ([cons-if-true (lambda (bool carv cdrv)
(if bool
(cons carv cdrv)
cdrv))])
(cons-if-true
(very-verbose)
'very-verbose
(cons-if-true (disable-inlining) 'disable-inlining null))))
(exit 1))])

View File

@ -0,0 +1,99 @@
#lang scheme/base
(require scheme/cmdline
raco/command-name
setup/pack
setup/getinfo
compiler/distribute)
(define verbose (make-parameter #f))
(define collection? (make-parameter #f))
(define default-plt-name "archive")
(define plt-name (make-parameter default-plt-name))
(define plt-files-replace (make-parameter #f))
(define plt-files-plt-relative? (make-parameter #f))
(define plt-files-plt-home-relative? (make-parameter #f))
(define plt-force-install-dir? (make-parameter #f))
(define plt-setup-collections (make-parameter null))
(define plt-include-compiled (make-parameter #f))
(define mzc-symbol (string->symbol (short-program+command-name)))
(define-values (plt-output source-files)
(command-line
#:program (short-program+command-name)
#:once-each
[("--collect") "<path>s specify collections instead of files/dirs"
(collection? #t)]
[("--plt-name") name "Set the printed <name> describing the archive"
(plt-name name)]
[("--replace") "Files in archive replace existing files when unpacked"
(plt-files-replace #t)]
[("--at-plt") "Files/dirs in archive are relative to user's add-ons directory"
(plt-files-plt-relative? #t)]
#:once-any
[("--all-users") "Files/dirs in archive go to PLT installation if writable"
(plt-files-plt-home-relative? #t)]
[("--force-all-users") "Files/dirs forced to PLT installation"
(plt-files-plt-home-relative? #t) (plt-force-install-dir? #t)]
#:once-each
[("--include-compiled") "Include \"compiled\" subdirectories in the archive"
(plt-include-compiled #t)]
#:multi
[("++setup") collect "Setup <collect> after the archive is unpacked"
(plt-setup-collections (append (plt-setup-collections) (list collect)))]
#:once-each
[("-v") "Verbose mode"
(verbose #t)]
#:args (dest-file . path)
(values dest-file path)))
(if (not (collection?))
;; Files and directories
(begin
(for ([fd source-files])
(unless (relative-path? fd)
(error mzc-symbol
"file/directory is not relative to the current directory: \"~a\""
fd)))
(pack-plt plt-output
(plt-name)
source-files
#:collections (map list (plt-setup-collections))
#:file-mode (if (plt-files-replace) 'file-replace 'file)
#:plt-relative? (or (plt-files-plt-relative?)
(plt-files-plt-home-relative?))
#:at-plt-home? (plt-files-plt-home-relative?)
#:test-plt-dirs (if (or (plt-force-install-dir?)
(not (plt-files-plt-home-relative?)))
#f
'("collects" "doc" "include" "lib"))
#:requires
null)
(when (verbose)
(printf " [output to \"~a\"]\n" plt-output)))
;; Collection
(begin
(pack-collections-plt
plt-output
(if (eq? default-plt-name (plt-name)) #f (plt-name))
(map (lambda (sf)
(let loop ([sf sf])
(let ([m (regexp-match "^([^/]*)/(.*)$" sf)])
(if m (cons (cadr m) (loop (caddr m))) (list sf)))))
source-files)
#:replace? (plt-files-replace)
#:extra-setup-collections (map list (plt-setup-collections))
#:file-filter (if (plt-include-compiled)
(lambda (path)
(or (regexp-match #rx#"compiled$" (path->bytes path))
(std-filter path)))
std-filter)
#:at-plt-home? (plt-files-plt-home-relative?)
#:test-plt-collects? (not (plt-force-install-dir?)))
(when (verbose)
(printf " [output to \"~a\"]\n" plt-output))))
(module test racket/base)

View File

@ -0,0 +1,4 @@
#lang racket/base
(require (submod "expand.rkt" expand))
(show-program (lambda (e) e))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,102 @@
#lang scheme/base
(require scheme/cmdline
raco/command-name
setup/unpack
racket/file
racket/port
racket/match
racket/string
racket/pretty)
(define verbose (make-parameter #f))
(define just-show? (make-parameter #f))
(define replace? (make-parameter #f))
(define show-config? (make-parameter #f))
(define mzc-symbol (string->symbol (short-program+command-name)))
(define files
(command-line
#:program (short-program+command-name)
#:once-each
[("-l" "--list") "just list archive content"
(just-show? #t)]
[("-c" "--config") "show archive configuration"
(show-config? #t)]
[("-f" "--force") "replace existing files when unpacking"
(replace? #t)]
#:args archive
archive))
(define (desc->path dir)
(if (path? dir)
dir
(apply build-path
(symbol->string (car dir))
(cdr dir))))
(for ([filename (in-list files)])
(fold-plt-archive filename
(lambda (config a)
(when (show-config?)
(match config
[`(lambda (request failure)
(case request
((name) ,name)
((unpacker) (quote mzscheme))
((requires) (quote ,reqs))
((conflicts) (quote ,conflicts))
((plt-relative?) ,plt-rel?)
((plt-home-relative?) ,plt-home-rel?)
((test-plt-dirs) ,test-plt-dirs)
(else (failure))))
(printf "config:\n")
(printf " name: ~s\n" name)
(printf " requires:\n")
(for ([c (in-list reqs)])
(printf " ~s ~s\n" (string-join (car c) "/") (cadr c)))
(printf " conflicts:\n")
(for ([c (in-list conflicts)])
(printf " ~s\n" (string-join c "/")))
(cond
[plt-home-rel? (printf " unpack to main installation\n")]
[plt-rel? (printf " unpack to user add-ons\n")]
[else (printf " unpack locally\n")])]
[else
(printf "config function:\n")
(pretty-write config)]))
a)
(lambda (setup i a)
(when (show-config?)
(match setup
[`(unit (import main-collects-parent-dir mzuntar) (export) (mzuntar void) (quote ,c))
(printf "setup collections:\n")
(for ([c (in-list c)])
(printf " ~s\n" (string-join c "/")))]
[else
(printf "setup unit:\n")
(pretty-write setup)]))
a)
(lambda (dir a)
(unless (eq? dir 'same)
(if (just-show?)
(printf "~a\n" (path->directory-path (desc->path dir)))
(make-directory* (desc->path dir))))
a)
(lambda (file i kind a)
(if (just-show?)
(printf "~a~a\n" (desc->path file)
(if (eq? kind 'file-replace)
" [replace]"
""))
(call-with-output-file*
(desc->path file)
#:exists (if (or (eq? kind 'file-replace)
(replace?))
'truncate/replace
'error)
(lambda (o)
(copy-port i o))))
a)
(void)))

View File

@ -0,0 +1,5 @@
#lang racket/base
(require compiler/compiler compiler/sig racket/unit)
(provide compiler@)
(define-unit-from-context compiler@ compiler^)

View File

@ -0,0 +1,606 @@
#lang racket/base
(require compiler/zo-parse
syntax/modcollapse
racket/port
racket/match
racket/list
racket/set
racket/path)
(provide decompile)
;; ----------------------------------------
(define primitive-table
;; Figure out number-to-id mapping for kernel functions in `primitive'
(let ([bindings
(let ([ns (make-base-empty-namespace)])
(parameterize ([current-namespace ns])
(namespace-require ''#%kernel)
(namespace-require ''#%unsafe)
(namespace-require ''#%flfxnum)
(namespace-require ''#%extfl)
(namespace-require ''#%futures)
(namespace-require ''#%foreign)
(for/list ([l (namespace-mapped-symbols)])
(cons l (with-handlers ([exn:fail? (lambda (x) #f)])
(compile l))))))]
[table (make-hash)])
(for ([b (in-list bindings)])
(let ([v (and (cdr b)
(zo-parse
(open-input-bytes
(with-output-to-bytes
(λ () (write (cdr b)))))))])
(let ([n (match v
[(struct compilation-top (_ _ prefix (struct primval (n)))) n]
[else #f])])
(hash-set! table n (car b)))))
table))
(define (list-ref/protect l pos who)
(list-ref l pos)
#;
(if (pos . < . (length l))
(list-ref l pos)
`(OUT-OF-BOUNDS ,who ,pos ,(length l) ,l)))
;; ----------------------------------------
(define-struct glob-desc (vars num-tls num-stxs num-lifts))
;; Main entry:
(define (decompile top)
(let ([stx-ht (make-hasheq)])
(match top
[(struct compilation-top (max-let-depth binding-namess prefix form))
(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
(expose-module-path-indexes
`(begin
,@defns
,(decompile-form form globs '(#%globals) (make-hasheq) stx-ht))))]
[else (error 'decompile "unrecognized: ~e" top)])))
(define (expose-module-path-indexes e)
;; This is a nearly general replace-in-graph function. (It seems like a lot
;; of work to expose module path index content and sharing, though.)
(define ht (make-hasheq))
(define mconses null)
(define (x-mcons a b)
(define m (mcons a b))
(set! mconses (cons (cons m (cons a b)) mconses))
m)
(define main
(let loop ([e e])
(cond
[(hash-ref ht e #f)]
[(module-path-index? e)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(define-values (name base) (module-path-index-split e))
(placeholder-set! ph (x-mcons '#%modidx
(x-mcons (loop name)
(x-mcons (loop base)
null))))
ph]
[(pair? e)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(placeholder-set! ph (cons (loop (car e))
(loop (cdr e))))
ph]
[(mpair? e)
(define m (mcons #f #f))
(hash-set! ht e m)
(set! mconses (cons (cons m (cons (loop (mcar e))
(loop (mcdr e))))
mconses))
m]
[(box? e)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(placeholder-set! ph (box (loop (unbox e))))
ph]
[(vector? e)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(placeholder-set! ph
(for/vector #:length (vector-length e) ([i (in-vector e)])
(loop i)))
ph]
[(hash? e)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(placeholder-set! ph
((cond
[(hash-eq? ht)
make-hasheq-placeholder]
[(hash-eqv? ht)
make-hasheqv-placeholder]
[else make-hash-placeholder])
(for/list ([(k v) (in-hash e)])
(cons (loop k) (loop v)))))
ph]
[(prefab-struct-key e)
=> (lambda (k)
(define ph (make-placeholder #f))
(hash-set! ht e ph)
(placeholder-set! ph
(apply make-prefab-struct
k
(map loop
(cdr (vector->list (struct->vector e))))))
ph)]
[else
e])))
(define l (make-reader-graph (cons main mconses)))
(for ([i (in-list (cdr l))])
(set-mcar! (car i) (cadr i))
(set-mcdr! (car i) (cddr i)))
(car l))
(define (decompile-prefix a-prefix stx-ht)
(match a-prefix
[(struct prefix (num-lifts toplevels stxs src-insp-desc))
(let ([lift-ids (for/list ([i (in-range num-lifts)])
(gensym 'lift))]
[stx-ids (map (lambda (i) (gensym 'stx))
stxs)])
(values (glob-desc
(append
(map (lambda (tl)
(match tl
[#f '#%linkage]
[(? symbol?) (string->symbol (format "_~a" tl))]
[(struct global-bucket (name))
(string->symbol (format "_~a" name))]
[(struct module-variable (modidx sym pos phase constantness))
(if (and (module-path-index? modidx)
(let-values ([(n b) (module-path-index-split modidx)])
(and (not n) (not b))))
(string->symbol (format "_~a" sym))
(string->symbol (format "_~s~a@~s~a"
sym
(match constantness
['constant ":c"]
['fixed ":f"]
[(function-shape a pm?)
(if pm? ":P" ":p")]
[(struct-type-shape c) ":t"]
[(constructor-shape a) ":mk"]
[(predicate-shape) ":?"]
[(accessor-shape c) ":ref"]
[(mutator-shape c) ":set!"]
[else ""])
(mpi->string modidx)
(if (zero? phase)
""
(format "/~a" phase)))))]
[else (error 'decompile-prefix "bad toplevel: ~e" tl)]))
toplevels)
stx-ids
(if (null? stx-ids) null '(#%stx-array))
lift-ids)
(length toplevels)
(length stxs)
num-lifts)
(list*
`(quote inspector ,src-insp-desc)
;; `(quote tls ,toplevels)
(map (lambda (stx id)
`(define ,id ,(if stx
`(#%decode-syntax
,(decompile-stx (stx-content stx) stx-ht))
#f)))
stxs stx-ids))))]
[else (error 'decompile-prefix "huh?: ~e" a-prefix)]))
(define (decompile-stx stx stx-ht)
(or (hash-ref stx-ht stx #f)
(let ([p (mcons #f #f)])
(hash-set! stx-ht stx p)
(match stx
[(stx-obj datum wrap srcloc props tamper-status)
(set-mcar! p (case tamper-status
[(clean) 'wrap]
[(tainted) 'wrap-tainted]
[(armed) 'wrap-armed]))
(set-mcdr! p (mcons
(cond
[(pair? datum)
(cons (decompile-stx (car datum) stx-ht)
(let loop ([l (cdr datum)])
(cond
[(null? l) null]
[(pair? l)
(cons (decompile-stx (car l) stx-ht)
(loop (cdr l)))]
[else
(decompile-stx l stx-ht)])))]
[(vector? datum)
(for/vector ([e (in-vector datum)])
(decompile-stx e stx-ht))]
[(box? datum)
(box (decompile-stx (unbox datum) stx-ht))]
[else datum])
(let* ([l (mcons wrap null)]
[l (if (hash-count props)
(mcons props l)
l)]
[l (if srcloc
(mcons srcloc l)
l)])
l)))
p]))))
(define (mpi->string modidx)
(cond
[(symbol? modidx) modidx]
[else
(collapse-module-path-index modidx)]))
(define (decompile-module mod-form orig-stack stx-ht mod-name)
(match mod-form
[(struct mod (name srcname self-modidx
prefix provides requires body syntax-bodies unexported
max-let-depth dummy lang-info
internal-context binding-names
flags pre-submodules post-submodules))
(let-values ([(globs defns) (decompile-prefix prefix stx-ht)]
[(stack) (append '(#%modvars) orig-stack)]
[(closed) (make-hasheq)])
`(,mod-name ,(if (symbol? name) name (last name)) ....
(quote self ,self-modidx)
(quote internal-context
,(if (stx? internal-context)
`(#%decode-syntax
,(decompile-stx (stx-content internal-context) stx-ht))
internal-context))
(quote bindings ,(for/hash ([(phase ht) (in-hash binding-names)])
(values phase
(for/hash ([(sym id) (in-hash ht)])
(values sym
(if (eq? id #t)
#t
`(#%decode-syntax
,(decompile-stx (stx-content id) stx-ht))))))))
(quote language-info ,lang-info)
,@(if (null? flags) '() (list `(quote ,flags)))
,@(let ([l (apply
append
(for/list ([req (in-list requires)]
#:when (pair? (cdr req)))
(define l (for/list ([mpi (in-list (cdr req))])
(define p (mpi->string mpi))
(if (path? p)
(let ([d (current-load-relative-directory)])
(path->string (if d
(find-relative-path (simplify-path d #t)
(simplify-path p #f)
#:more-than-root? #t)
p)))
p)))
(if (eq? 0 (car req))
l
`((,@(case (car req)
[(#f) `(for-label)]
[(1) `(for-syntax)]
[else `(for-meta ,(car req))])
,@l)))))])
(if (null? l)
null
`((require ,@l))))
(provide ,@(apply
append
(for/list ([p (in-list provides)])
(define phase (car p))
(define l
(for/list ([pv (in-list (append (cadr p) (caddr p)))])
(match pv
[(struct provided (name src src-name nom-src src-phase protected?))
(define n (if (eq? name src-name)
name
`(rename-out [,src-name ,name])))
(if protected?
`(protect-out ,n)
n)])))
(if (or (null? l) (eq? phase 0))
l
`((,@(case phase
[(#f) `(for-label)]
[(1) `(for-syntax)]
[else `(for-meta ,phase)])
,@l))))))
,@defns
,@(for/list ([submod (in-list pre-submodules)])
(decompile-module submod orig-stack stx-ht 'module))
,@(for/list ([b (in-list syntax-bodies)])
(let loop ([n (sub1 (car b))])
(if (zero? n)
(cons 'begin
(for/list ([form (in-list (cdr b))])
(decompile-form form globs stack closed stx-ht)))
(list 'begin-for-syntax (loop (sub1 n))))))
,@(map (lambda (form)
(decompile-form form globs stack closed stx-ht))
body)
,@(for/list ([submod (in-list post-submodules)])
(decompile-module submod orig-stack stx-ht 'module*))))]
[else (error 'decompile-module "huh?: ~e" mod-form)]))
(define (decompile-form form globs stack closed stx-ht)
(match form
[(? mod?)
(decompile-module form stack stx-ht 'module)]
[(struct def-values (ids rhs))
`(define-values ,(map (lambda (tl)
(match tl
[(struct toplevel (depth pos const? set-const?))
(list-ref/protect (glob-desc-vars globs) pos 'def-vals)]))
ids)
,(if (inline-variant? rhs)
`(begin
,(list 'quote '%%inline-variant%%)
,(decompile-expr (inline-variant-inline rhs) globs stack closed)
,(decompile-expr (inline-variant-direct rhs) globs stack closed))
(decompile-expr rhs globs stack closed)))]
[(struct def-syntaxes (ids rhs prefix max-let-depth dummy))
`(define-syntaxes ,ids
,(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
`(let ()
,@defns
,(decompile-form rhs globs '(#%globals) closed stx-ht))))]
[(struct seq-for-syntax (exprs prefix max-let-depth dummy))
`(begin-for-syntax
,(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
`(let ()
,@defns
,@(for/list ([rhs (in-list exprs)])
(decompile-form rhs globs '(#%globals) closed stx-ht)))))]
[(struct seq (forms))
`(begin ,@(map (lambda (form)
(decompile-form form globs stack closed stx-ht))
forms))]
[(struct splice (forms))
`(begin ,@(map (lambda (form)
(decompile-form form globs stack closed stx-ht))
forms))]
[(struct req (reqs dummy))
`(#%require . (#%decode-syntax ,reqs))]
[else
(decompile-expr form globs stack closed)]))
(define (extract-name name)
(if (symbol? name)
(gensym name)
(if (vector? name)
(gensym (vector-ref name 0))
#f)))
(define (extract-id expr)
(match expr
[(struct lam (name flags num-params arg-types rest? closure-map closure-types tl-map max-let-depth body))
(extract-name name)]
[(struct case-lam (name lams))
(extract-name name)]
[(struct closure (lam gen-id))
(extract-id lam)]
[else #f]))
(define (extract-ids! body ids)
(match body
[(struct let-rec (procs body))
(for ([proc (in-list procs)]
[delta (in-naturals)])
(when (< -1 delta (vector-length ids))
(vector-set! ids delta (extract-id proc))))
(extract-ids! body ids)]
[(struct install-value (val-count pos boxes? rhs body))
(extract-ids! body ids)]
[(struct boxenv (pos body))
(extract-ids! body ids)]
[else #f]))
(define (decompile-tl expr globs stack closed no-check?)
(match expr
[(struct toplevel (depth pos const? ready?))
(let ([id (list-ref/protect (glob-desc-vars globs) pos 'toplevel)])
(cond
[no-check? id]
[(and (not const?) (not ready?))
`(#%checked ,id)]
#;[(and const? ready?) `(#%const ,id)]
#;[const? `(#%iconst ,id)]
[else id]))]))
(define (decompile-expr expr globs stack closed)
(match expr
[(struct toplevel (depth pos const? ready?))
(decompile-tl expr globs stack closed #f)]
[(struct varref (tl dummy))
`(#%variable-reference ,(if (eq? tl #t)
'<constant-local>
(decompile-tl tl globs stack closed #t)))]
[(struct topsyntax (depth pos midpt))
(list-ref/protect (glob-desc-vars globs) (+ midpt pos) 'topsyntax)]
[(struct primval (id))
(hash-ref primitive-table id (lambda () (error "unknown primitive: " id)))]
[(struct assign (id rhs undef-ok?))
`(set! ,(decompile-expr id globs stack closed)
,(decompile-expr rhs globs stack closed))]
[(struct localref (unbox? offset clear? other-clears? type))
(let ([id (list-ref/protect stack offset 'localref)])
(let ([e (if unbox?
`(#%unbox ,id)
id)])
(if clear?
`(#%sfs-clear ,e)
e)))]
[(? lam?)
`(lambda . ,(decompile-lam expr globs stack closed))]
[(struct case-lam (name lams))
`(case-lambda
,@(map (lambda (lam)
(decompile-lam lam globs stack closed))
lams))]
[(struct let-one (rhs body type unused?))
(let ([id (or (extract-id rhs)
(gensym (or type (if unused? 'unused 'local))))])
`(let ([,id ,(decompile-expr rhs globs (cons id stack) closed)])
,(decompile-expr body globs (cons id stack) closed)))]
[(struct let-void (count boxes? body))
(let ([ids (make-vector count #f)])
(extract-ids! body ids)
(let ([vars (for/list ([i (in-range count)]
[id (in-vector ids)])
(or id (gensym (if boxes? 'localvb 'localv))))])
`(let ,(map (lambda (i) `[,i ,(if boxes? `(#%box ?) '?)])
vars)
,(decompile-expr body globs (append vars stack) closed))))]
[(struct let-rec (procs body))
`(begin
(#%set!-rec-values ,(for/list ([p (in-list procs)]
[i (in-naturals)])
(list-ref/protect stack i 'let-rec))
,@(map (lambda (proc)
(decompile-expr proc globs stack closed))
procs))
,(decompile-expr body globs stack closed))]
[(struct install-value (count pos boxes? rhs body))
`(begin
(,(if boxes? '#%set-boxes! 'set!-values)
,(for/list ([i (in-range count)])
(list-ref/protect stack (+ i pos) 'install-value))
,(decompile-expr rhs globs stack closed))
,(decompile-expr body globs stack closed))]
[(struct boxenv (pos body))
(let ([id (list-ref/protect stack pos 'boxenv)])
`(begin
(set! ,id (#%box ,id))
,(decompile-expr body globs stack closed)))]
[(struct branch (test then else))
`(if ,(decompile-expr test globs stack closed)
,(decompile-expr then globs stack closed)
,(decompile-expr else globs stack closed))]
[(struct application (rator rands))
(let ([stack (append (for/list ([i (in-list rands)]) (gensym 'rand))
stack)])
(annotate-unboxed
rands
(annotate-inline
`(,(decompile-expr rator globs stack closed)
,@(map (lambda (rand)
(decompile-expr rand globs stack closed))
rands)))))]
[(struct apply-values (proc args-expr))
`(#%apply-values ,(decompile-expr proc globs stack closed)
,(decompile-expr args-expr globs stack closed))]
[(struct with-immed-mark (key-expr val-expr body-expr))
(let ([id (gensym 'cmval)])
`(#%call-with-immediate-continuation-mark
,(decompile-expr key-expr globs stack closed)
(lambda (,id) ,(decompile-expr body-expr globs (cons id stack) closed))
,(decompile-expr val-expr globs stack closed)))]
[(struct seq (exprs))
`(begin ,@(for/list ([expr (in-list exprs)])
(decompile-expr expr globs stack closed)))]
[(struct beg0 (exprs))
`(begin0
,@(for/list ([expr (in-list exprs)])
(decompile-expr expr globs stack closed))
;; Make sure a single expression doesn't look like tail position:
,@(if (null? (cdr exprs)) (list #f) null))]
[(struct with-cont-mark (key val body))
`(with-continuation-mark
,(decompile-expr key globs stack closed)
,(decompile-expr val globs stack closed)
,(decompile-expr body globs stack closed))]
[(struct closure (lam gen-id))
(if (hash-ref closed gen-id #f)
gen-id
(begin
(hash-set! closed gen-id #t)
`(#%closed ,gen-id ,(decompile-expr lam globs stack closed))))]
[else `(quote ,expr)]))
(define (decompile-lam expr globs stack closed)
(match expr
[(struct closure (lam gen-id)) (decompile-lam lam globs stack closed)]
[(struct lam (name flags num-params arg-types rest? closure-map closure-types tl-map max-let-depth body))
(let ([vars (for/list ([i (in-range num-params)]
[type (in-list arg-types)])
(gensym (format "~a~a-"
(case type
[(ref) "argbox"]
[(val) "arg"]
[else (format "arg~a" type)])
i)))]
[rest-vars (if rest? (list (gensym 'rest)) null)]
[captures (map (lambda (v)
(list-ref/protect stack v 'lam))
(vector->list closure-map))])
`((,@vars . ,(if rest?
(car rest-vars)
null))
,@(if (and name (not (null? name)))
`(',name)
null)
,@(if (null? flags) null `('(flags: ,@flags)))
,@(if (null? captures)
null
`('(captures: ,@(map (lambda (c t)
(if t
`(,t ,c)
c))
captures
closure-types)
,@(if (not tl-map)
'()
(list
(for/list ([pos (in-list (sort (set->list tl-map) <))])
(define tl-pos
(cond
[(or (pos . < . (glob-desc-num-tls globs))
(zero? (glob-desc-num-stxs globs)))
pos]
[(= pos (glob-desc-num-tls globs))
'stx]
[else
(+ pos (glob-desc-num-stxs globs))]))
(if (eq? tl-pos 'stx)
'#%syntax
(list-ref/protect (glob-desc-vars globs)
tl-pos
'lam))))))))
,(decompile-expr body globs
(append captures
(append vars rest-vars))
closed)))]))
(define (annotate-inline a)
a)
(define (annotate-unboxed args a)
a)
;; ----------------------------------------
#;
(begin
(require scheme/pretty)
(define (try e)
(pretty-print
(decompile
(zo-parse (let-values ([(in out) (make-pipe)])
(write (parameterize ([current-namespace (make-base-namespace)])
(compile e))
out)
(close-output-port out)
in)))))
(pretty-print
(decompile
(zo-parse (open-input-file "/home/mflatt/proj/plt/collects/tests/mzscheme/benchmarks/common/sboyer_ss.zo"))))
#;
(try '(lambda (q . more)
(letrec ([f (lambda (x) f)])
(lambda (g) f)))))

View File

@ -0,0 +1,20 @@
#lang racket/base
(require racket/match racket/contract compiler/zo-parse)
(define (alpha-vary-ctop top)
(match top
[(struct compilation-top (max-let-depth binding-namess prefix form))
(make-compilation-top max-let-depth binding-namess (alpha-vary-prefix prefix) form)]))
(define (alpha-vary-prefix p)
(struct-copy prefix p
[toplevels
(map (match-lambda
[(and sym (? symbol?))
(gensym sym)]
[other
other])
(prefix-toplevels p))]))
(provide/contract
[alpha-vary-ctop (compilation-top? . -> . compilation-top?)])

View File

@ -0,0 +1,63 @@
#lang racket/base
#|
Here's the idea:
- Take a module's bytecode
- Recursively get all the bytecode for modules that the target requires
- After reading it, prune everything that isn't at phase 0 (the runtime phase)
- Now that we have all the modules, the next step is to merge them into a single
module
-- Although actually we collapse them into the top-level, not a module
- To do that, we iterate through all the modules doing two things as we go:
-- Incrementing all the global variable references by all the references in all
the modules
--- So if A has 5, then B's start at index 5 and so on
-- Replacing module variable references with the actual global variables
corresponding to those variables
--- So if A's variable 'x' is in global slot 4, then if B refers to it, it
directly uses slot 4, rather than a module-variable slot
- At that point we have all the module code in a single top-level, but many
toplevels won't be used because a library function isn't really used
- So, we do a "garbage collection" on elements of the prefix
- First, we create a dependency graph of all toplevels and the initial scope
- Then, we do a DFS on the initial scope and keep all those toplevels, throwing
away the construction of everything else
[XXX: This may be broken because of side-effects.]
- Now we have a small amount code, but because we want to go back to source,
we need to fix it up a bit; because different modules may've used the same
names
- So, we do alpha-renaming, but it's easy because names are only used in the
compilation-top prefix structure
[TODO]
- Next, we decompile
- Then, it will pay to do dead code elimination and inlining, etc.
|#
(require racket/cmdline
racket/set
raco/command-name
"main.rkt")
(let ([output-file (make-parameter #f)])
(command-line #:program (short-program+command-name)
#:multi
[("-e" "--exclude-modules") path "Exclude <path> from flattening"
(current-excluded-modules (set-add (current-excluded-modules) path))]
#:once-each
[("-o") dest-filename "Write output as <dest-filename>"
(output-file (string->path dest-filename))]
[("-g" "--garbage-collect") "Garbage-collect final module (unsound)"
(garbage-collect-toplevels-enabled #t)]
[("-r" "--recompile") "Recompile final module to re-run optimizations"
(recompile-enabled #t)]
#:args (filename)
(demodularize filename (output-file))))
(module test racket/base)

View File

@ -0,0 +1,288 @@
#lang racket/base
(require racket/match
racket/list
racket/dict
racket/contract
compiler/zo-parse
"util.rkt")
; XXX Use efficient set structure
(define (gc-toplevels top)
(match top
[(struct compilation-top (max-let-depth binding-namess top-prefix form))
(define lift-start
(prefix-lift-start top-prefix))
(define max-depgraph-index
(+ (prefix-num-lifts top-prefix)
lift-start))
(define top-node max-depgraph-index)
(define DEP-GRAPH (make-vector (add1 top-node) (make-refs empty empty)))
(define build-graph! (make-build-graph! DEP-GRAPH))
(define _void (build-graph! (list top-node) form))
(define-values (used-tls stxs) (graph-dfs DEP-GRAPH top-node))
(define ordered-used-tls (sort (rest used-tls) <=)) ; This rest drops off the top-node
(define ordered-stxs (sort stxs <=))
(define (lift? i) (lift-start . <= . i))
(define-values (lifts normal-tls) (partition lift? ordered-used-tls))
(define new-prefix
(make-prefix
(length lifts)
(for/list ([i normal-tls])
(list-ref (prefix-toplevels top-prefix) i))
(for/list ([i ordered-stxs])
(list-ref (prefix-stxs top-prefix) i))))
(define new-lift-start
(prefix-lift-start new-prefix))
; XXX This probably breaks max-let-depth
(define new-form
((gc-toplevels-form
(lambda (pos) (index<=? pos ordered-used-tls))
(lambda (pos)
(if (lift? pos)
(+ new-lift-start (index<=? pos lifts))
(index<=? pos normal-tls)))
(lambda (stx-pos)
(index<=? stx-pos ordered-stxs))
(prefix-syntax-start new-prefix))
form))
(log-debug (format "Total TLS: ~S" (length normal-tls)))
(log-debug (format "Used TLS: ~S" normal-tls))
(log-debug (format "Total lifts: ~S" (length lifts)))
(log-debug (format "Used lifts: ~S" lifts))
(log-debug (format "Total stxs: ~S" (length stxs)))
(log-debug (format "Used stxs: ~S" ordered-stxs))
(make-compilation-top
max-let-depth
#hash()
new-prefix
new-form)]))
(define-struct refs (tl stx) #:transparent)
(define (make-build-graph! DEP-GRAPH)
(define (build-graph!* form lhs)
(match form
[(struct def-values (ids rhs))
(define new-lhs (map toplevel-pos ids))
; If we require one, we should require all, so make them reference each other
(for-each (lambda (tl) (build-graph! new-lhs tl)) ids)
(build-graph! new-lhs rhs)]
[(? def-syntaxes?)
(error 'build-graph "Doesn't handle syntax")]
[(? seq-for-syntax?)
(error 'build-graph "Doesn't handle syntax")]
[(struct inline-variant (direct inline))
(build-graph! lhs direct)]
[(struct req (reqs dummy))
(build-graph! lhs dummy)]
[(? mod?)
(error 'build-graph "Doesn't handle modules")]
[(struct seq (forms))
(for-each (lambda (f) (build-graph! lhs f)) forms)]
[(struct splice (forms))
(for-each (lambda (f) (build-graph! lhs f)) forms)]
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
(build-graph! lhs body)]
[(and c (struct closure (code gen-id)))
(build-graph! lhs code)]
[(and cl (struct case-lam (name clauses)))
(for-each (lambda (l) (build-graph! lhs l))
clauses)]
[(struct let-one (rhs body flonum? unused?))
(build-graph! lhs rhs)
(build-graph! lhs body)]
[(and f (struct let-void (count boxes? body)))
(build-graph! lhs body)]
[(and f (struct install-value (_ _ _ rhs body)))
(build-graph! lhs rhs)
(build-graph! lhs body)]
[(struct let-rec (procs body))
(for-each (lambda (l) (build-graph! lhs l)) procs)
(build-graph! lhs body)]
[(and f (struct boxenv (_ body)))
(build-graph! lhs body)]
[(and f (struct toplevel (_ pos _ _)))
(for-each (lambda (lhs)
(dict-update! DEP-GRAPH lhs
(match-lambda
[(struct refs (tls stxs))
(make-refs (list* pos tls) stxs)])))
lhs)]
[(and f (struct topsyntax (_ pos _)))
(for-each (lambda (lhs)
(dict-update! DEP-GRAPH lhs
(match-lambda
[(struct refs (tls stxs))
(make-refs tls (list* pos stxs))])))
lhs)]
[(struct application (rator rands))
(for-each (lambda (f) (build-graph! lhs f))
(list* rator rands))]
[(struct branch (test then else))
(for-each (lambda (f) (build-graph! lhs f))
(list test then else))]
[(struct with-cont-mark (key val body))
(for-each (lambda (f) (build-graph! lhs f))
(list key val body))]
[(struct with-immed-mark (key val body))
(for-each (lambda (f) (build-graph! lhs f))
(list key val body))]
[(struct beg0 (seq))
(for-each (lambda (f) (build-graph! lhs f))
seq)]
[(struct varref (tl dummy))
(build-graph! lhs tl)
(build-graph! lhs dummy)]
[(and f (struct assign (id rhs undef-ok?)))
(build-graph! lhs id)
(build-graph! lhs rhs)]
[(struct apply-values (proc args-expr))
(build-graph! lhs proc)
(build-graph! lhs args-expr)]
[(and f (struct primval (id)))
(void)]
[(and f (struct localref (unbox? pos clear? other-clears? type)))
(void)]
[(and v (not (? form?)))
(void)]))
(define-values (first-build-graph!** build-graph!**)
(build-form-memo build-graph!* #:void? #t))
(define (build-graph! lhs form) (first-build-graph!** form lhs))
build-graph!)
(define (graph-dfs g start-node)
(define visited? (make-hasheq))
(define (visit-tl n tls stxs)
(if (hash-has-key? visited? n)
(values tls stxs)
(match (dict-ref g n)
[(struct refs (n-tls n-stxs))
(hash-set! visited? n #t)
(define-values (new-tls1 new-stxs1)
(for/fold ([new-tls tls]
[new-stxs stxs])
([tl (in-list n-tls)])
(visit-tl tl new-tls new-stxs)))
(define new-stxs2
(for/fold ([new-stxs new-stxs1])
([stx (in-list n-stxs)])
(define this-stx (visit-stx stx))
(if this-stx
(list* this-stx new-stxs)
new-stxs)))
(values (list* n new-tls1)
new-stxs2)])))
(define stx-visited? (make-hasheq))
(define (visit-stx n)
(if (hash-has-key? stx-visited? n)
#f
(begin (hash-set! stx-visited? n #t)
n)))
(visit-tl start-node empty empty))
; index<=? : number? (listof number?) -> (or/c number? false/c)
; returns the index of n in l and assumes that l is sorted by <=
(define (index<=? n l)
(match l
[(list) #f]
[(list-rest f l)
(cond
[(= n f)
0]
[(< n f)
#f]
[else
(let ([rec (index<=? n l)])
(if rec (add1 rec) rec))])]))
(define (identity x) x)
(define (gc-toplevels-form keep? update-tl update-ts new-ts-midpt)
(define (inner-update form)
(match form
[(struct def-values (ids rhs))
(if (ormap (compose keep? toplevel-pos) ids)
(make-def-values (map update ids)
(update rhs))
#f)]
[(? def-syntaxes?)
(error 'gc-tls "Doesn't handle syntax")]
[(? seq-for-syntax?)
(error 'gc-tls "Doesn't handle syntax")]
[(struct req (reqs dummy))
(make-req reqs (update dummy))]
[(? mod?)
(error 'gc-tls "Doesn't handle modules")]
[(struct seq (forms))
(make-seq (filter identity (map update forms)))]
[(struct splice (forms))
(make-splice (filter identity (map update forms)))]
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
(struct-copy lam l
[toplevel-map #f] ; consevrative
[body (update body)])]
[(and c (struct closure (code gen-id)))
(struct-copy closure c
[code (update code)])]
[(and cl (struct case-lam (name clauses)))
(struct-copy case-lam cl
[clauses (map update clauses)])]
[(struct let-one (rhs body type unused?))
(make-let-one (update rhs) (update body) type unused?)]
[(and f (struct let-void (count boxes? body)))
(struct-copy let-void f
[body (update body)])]
[(and f (struct install-value (_ _ _ rhs body)))
(struct-copy install-value f
[rhs (update rhs)]
[body (update body)])]
[(struct let-rec (procs body))
(make-let-rec (map update procs) (update body))]
[(and f (struct boxenv (_ body)))
(struct-copy boxenv f [body (update body)])]
[(and f (struct toplevel (_ pos _ _)))
(struct-copy toplevel f
[pos (update-tl pos)])]
[(and f (struct topsyntax (_ pos _)))
(struct-copy topsyntax f
[pos (update-ts pos)]
[midpt new-ts-midpt])]
[(struct application (rator rands))
(make-application
(update rator)
(map update rands))]
[(struct branch (test then else))
(make-branch
(update test)
(update then)
(update else))]
[(struct with-cont-mark (key val body))
(make-with-cont-mark
(update key)
(update val)
(update body))]
[(struct beg0 (seq))
(make-beg0 (map update seq))]
[(struct varref (tl dummy))
(make-varref (update tl) (update dummy))]
[(and f (struct assign (id rhs undef-ok?)))
(struct-copy assign f
[id (update id)]
[rhs (update rhs)])]
[(struct apply-values (proc args-expr))
(make-apply-values
(update proc)
(update args-expr))]
[(and f (struct primval (id)))
f]
[(and f (struct localref (unbox? pos clear? other-clears? type)))
f]
[(and v (not (? form?)))
v]
))
(define-values (first-update update)
(build-form-memo inner-update))
first-update)
(provide/contract
[gc-toplevels (compilation-top? . -> . compilation-top?)])

View File

@ -0,0 +1,3 @@
#lang info
(define test-responsibles '((all jay)))

View File

@ -0,0 +1,91 @@
#lang racket/base
(require compiler/cm
compiler/zo-marshal
"alpha.rkt"
"gc-toplevels.rkt"
"merge.rkt"
"module.rkt"
"mpi.rkt"
"nodep.rkt"
"replace-modidx.rkt")
(provide current-excluded-modules
garbage-collect-toplevels-enabled
recompile-enabled
demodularize)
(define garbage-collect-toplevels-enabled (make-parameter #f))
(define recompile-enabled (make-parameter #f))
(define logger (make-logger 'demodularizer (current-logger)))
(define (demodularize file-to-batch [output-file #f])
(parameterize ([current-logger logger])
(define-values (base name must-be-dir?) (split-path file-to-batch))
(when must-be-dir?
(error 'demodularize "Cannot run on directory: ~a" file-to-batch))
(unless (file-exists? file-to-batch)
(error 'demodularize "File does not exist: ~a" file-to-batch))
;; Compile
(log-info "Compiling module")
(parameterize ([current-namespace (make-base-empty-namespace)])
(managed-compile-zo file-to-batch))
(define merged-zo-path
(or output-file
(path-add-suffix file-to-batch #"_merged.zo")))
;; Transformations
(define path-cache (make-hasheq))
(log-info "Removing dependencies")
(define-values (batch-nodep top-lang-info top-self-modidx get-modvar-rewrite)
(parameterize ([MODULE-PATHS path-cache])
(nodep-file file-to-batch)))
(log-info "Merging modules")
(define batch-merge
(parameterize ([MODULE-PATHS path-cache])
(merge-compilation-top get-modvar-rewrite batch-nodep)))
(define batch-gcd
(if (garbage-collect-toplevels-enabled)
(begin
(log-info "GC-ing top-levels")
(gc-toplevels batch-merge))
batch-merge))
(log-info "Alpha-varying top-levels")
(define batch-alpha
(alpha-vary-ctop batch-gcd))
(log-info "Replacing self-modidx")
(define batch-replace-modidx
(replace-modidx batch-alpha top-self-modidx))
(define batch-modname
(string->symbol (regexp-replace #rx"\\.zo$" (path->string merged-zo-path) "")))
(log-info (format "Modularizing into ~a" batch-modname))
(define batch-mod
(wrap-in-kernel-module batch-modname batch-modname top-lang-info top-self-modidx batch-replace-modidx))
(log-info "Writing merged zo")
(void
(with-output-to-file
merged-zo-path
(lambda ()
(zo-marshal-to batch-mod (current-output-port)))
#:exists 'replace))
(void
(when (recompile-enabled)
(define recomp
(compiled-expression-recompile
(parameterize ([read-accept-compiled #t])
(call-with-input-file merged-zo-path read))))
(call-with-output-file merged-zo-path
(lambda (out)
(write recomp out))
#:exists 'replace)))))

View File

@ -0,0 +1,229 @@
#lang racket/base
(require racket/list
racket/match
racket/contract
compiler/zo-parse
"util.rkt"
"mpi.rkt"
"nodep.rkt"
"update-toplevels.rkt")
(define MODULE-TOPLEVEL-OFFSETS (make-hasheq))
(define current-get-modvar-rewrite (make-parameter #f))
(define (merge-compilation-top get-modvar-rewrite top)
(parameterize ([current-get-modvar-rewrite get-modvar-rewrite])
(match top
[(struct compilation-top (max-let-depth binding-namess prefix form))
(define-values (new-max-let-depth new-prefix gen-new-forms)
(merge-form max-let-depth prefix form))
(define total-tls (length (prefix-toplevels new-prefix)))
(define total-stxs (length (prefix-stxs new-prefix)))
(define total-lifts (prefix-num-lifts new-prefix))
(log-debug (format "max-let-depth ~S to ~S" max-let-depth new-max-let-depth))
(log-debug (format "total toplevels ~S" total-tls))
(log-debug (format "total stxs ~S" total-stxs))
(log-debug (format "num-lifts ~S" total-lifts))
(for ([i (in-naturals)]
[p (in-list (prefix-toplevels new-prefix))])
(log-debug (format "new-prefix tls\t~v ~v" i p)))
(make-compilation-top
new-max-let-depth #hash() new-prefix
(make-splice (gen-new-forms new-prefix)))]
[else (error 'merge "unrecognized: ~e" top)])))
(define (merge-forms max-let-depth prefix forms)
(if (empty? forms)
(values max-let-depth prefix (lambda _ empty))
(let*-values ([(fmax-let-depth fprefix gen-fform) (merge-form max-let-depth prefix (first forms))]
[(rmax-let-depth rprefix gen-rforms) (merge-forms fmax-let-depth fprefix (rest forms))])
(values rmax-let-depth
rprefix
(lambda args
(append (apply gen-fform args)
(apply gen-rforms args)))))))
(define (merge-form max-let-depth prefix form)
(match form
[(? mod?)
(merge-module max-let-depth prefix form)]
[(struct seq (forms))
(merge-forms max-let-depth prefix forms)]
[(struct splice (forms))
(merge-forms max-let-depth prefix forms)]
[else
(values max-let-depth prefix (lambda _ (list form)))]))
(define (index-of v l)
(for/or ([e (in-list l)]
[i (in-naturals)]
#:when (eq? e v))
i))
(define (merge-prefix root-prefix mod-prefix)
(match-define (struct prefix (root-num-lifts root-toplevels root-stxs root-src-insp-desc)) root-prefix)
(match-define (struct prefix (mod-num-lifts mod-toplevels mod-stxs src-insp-desc)) mod-prefix)
(make-prefix (+ root-num-lifts mod-num-lifts)
(append root-toplevels mod-toplevels)
(append root-stxs mod-stxs)
root-src-insp-desc))
(struct toplevel-offset-rewriter (rewrite-fun meta) #:transparent)
(define (compute-new-modvar mv rw)
(match mv
[(struct module-variable (modidx sym pos phase constantness))
(match rw
[(struct modvar-rewrite (self-modidx provide->toplevel))
(log-debug (format "Rewriting ~a@~a of ~S" sym pos (mpi->path* modidx)))
(define tl (provide->toplevel sym pos))
(log-debug (format "Rewriting ~a@~a of ~S to ~S" sym pos (mpi->path* modidx) tl))
(match-define (toplevel-offset-rewriter rewrite-fun meta)
(hash-ref MODULE-TOPLEVEL-OFFSETS self-modidx
(lambda ()
(error 'compute-new-modvar "toplevel offset not yet computed: ~S" self-modidx))))
(log-debug (format "Rewriting ~a@~a of ~S (which is ~a) with ~S" sym pos (mpi->path* modidx) tl meta))
(define res (rewrite-fun tl))
(log-debug (format "Rewriting ~a@~a of ~S (which is ~a) with ~S and got ~S"
sym pos (mpi->path* modidx) tl meta res))
res])]))
(define (filter-rewritable-module-variable? name new-#f-idx toplevel-offset mod-toplevels)
(define-values
(i new-toplevels remap)
(for/fold ([i 0]
[new-toplevels empty]
[remap empty])
([tl (in-list mod-toplevels)]
[idx (in-naturals)])
(log-debug (format "[~S] mod-prefix tls\t~v ~v"
name idx tl))
(match tl
[(and mv (struct module-variable (modidx sym pos phase constantness)))
(define rw ((current-get-modvar-rewrite) modidx))
;; XXX We probably don't need to deal with #f phase
(unless (or (not phase) (zero? phase))
(error 'eliminate-module-variables "Non-zero phases not supported: ~S" mv))
(cond
; Primitive module like #%paramz
[(symbol? rw)
(log-debug (format "~S from ~S" sym rw))
(values (add1 i)
(list* tl new-toplevels)
(list* (+ i toplevel-offset) remap))]
[(module-path-index? rw)
(values (add1 i)
(list* tl new-toplevels)
(list* (+ i toplevel-offset) remap))]
[(modvar-rewrite? rw)
(values i
new-toplevels
(list* (compute-new-modvar mv rw) remap))]
[else
(error 'filter-rewritable-module-variable? "Unsupported module-rewrite: ~S" rw)])]
[tl
(cond
[(and new-#f-idx (not tl))
(log-debug (format "[~S] dropping a #f at ~v that would have been at ~v but is now at ~v"
name idx (+ i toplevel-offset) new-#f-idx))
(values i
new-toplevels
(list* new-#f-idx remap))]
[else
(values (add1 i)
(list* tl new-toplevels)
(list* (+ i toplevel-offset) remap))])])))
; XXX This would be more efficient as a vector
(values (reverse new-toplevels)
(reverse remap)))
(define (merge-module max-let-depth top-prefix mod-form)
(match mod-form
[(struct mod (name srcname self-modidx
mod-prefix provides requires body syntax-bodies
unexported mod-max-let-depth dummy lang-info
internal-context binding-names
flags pre-submodules post-submodules))
(define top-toplevels (prefix-toplevels top-prefix))
(define toplevel-offset (length top-toplevels))
(define topsyntax-offset (length (prefix-stxs top-prefix)))
(define lift-offset (prefix-num-lifts top-prefix))
(define mod-toplevels (prefix-toplevels mod-prefix))
(define new-#f-idx
(index-of #f top-toplevels))
(when new-#f-idx
(log-debug (format "[~S] found a #f entry in prefix already at ~v, squashing"
name new-#f-idx)))
(define-values (new-mod-toplevels toplevel-remap)
(filter-rewritable-module-variable? name new-#f-idx toplevel-offset mod-toplevels))
(define num-mod-toplevels
(length toplevel-remap))
(define mod-stxs
(length (prefix-stxs mod-prefix)))
(define mod-num-lifts
(prefix-num-lifts mod-prefix))
(define new-mod-prefix
(struct-copy prefix mod-prefix
[toplevels new-mod-toplevels]))
(define offset-meta (vector name srcname self-modidx))
(log-debug "Setting toplevel offsets rewriter for ~S and it is currently ~S"
offset-meta
(hash-ref MODULE-TOPLEVEL-OFFSETS self-modidx #f))
(hash-set! MODULE-TOPLEVEL-OFFSETS self-modidx
(toplevel-offset-rewriter
(lambda (n)
(log-debug "Finding offset ~a in ~S of ~S" n toplevel-remap offset-meta)
(list-ref toplevel-remap n))
offset-meta))
(unless (= (length toplevel-remap)
(length mod-toplevels))
(error 'merge-module "Not remapping everything: ~S ~S"
mod-toplevels toplevel-remap))
(log-debug (format "[~S] Incrementing toplevels by ~a"
name
toplevel-offset))
(log-debug (format "[~S] Incrementing lifts by ~a"
name
lift-offset))
(log-debug (format "[~S] Filtered mod-vars from ~a to ~a"
name
(length mod-toplevels)
(length new-mod-toplevels)))
(values (max max-let-depth mod-max-let-depth)
(merge-prefix top-prefix new-mod-prefix)
(lambda (top-prefix)
(log-debug (format "[~S] Updating top-levels" name))
(define top-lift-start (prefix-lift-start top-prefix))
(define mod-lift-start (prefix-lift-start mod-prefix))
(define total-lifts (prefix-num-lifts top-prefix))
(define max-toplevel (+ top-lift-start total-lifts))
(define update
(update-toplevels
(lambda (n)
(define new-idx
(cond
[(mod-lift-start . <= . n)
(log-debug (format "[~S] ~v is a lift"
name n))
(define which-lift (- n mod-lift-start))
(define lift-tl (+ top-lift-start lift-offset which-lift))
(when (lift-tl . >= . max-toplevel)
(error 'merge-module "[~S] lift error: orig(~a) which(~a) max(~a) lifts(~a) now(~a)"
name n which-lift num-mod-toplevels mod-num-lifts lift-tl))
lift-tl]
[else
;; xxx maybe change this to a vector after it is made to make this efficient
(list-ref toplevel-remap n)]))
(log-debug (format "[~S] ~v is remapped to ~v"
name n new-idx))
new-idx)
(lambda (n)
(+ n topsyntax-offset))
(prefix-syntax-start top-prefix)))
(map update body)))]))
(provide/contract
[merge-compilation-top (-> get-modvar-rewrite/c
compilation-top?
compilation-top?)])

View File

@ -0,0 +1,43 @@
#lang racket/base
(require racket/list
racket/match
racket/contract
compiler/zo-parse
"util.rkt")
(define (->module-path-index s)
(if (module-path-index? s)
s
(module-path-index-join `(quote ,s) #f)))
(define (wrap-in-kernel-module name srcname lang-info self-modidx top)
(match top
[(struct compilation-top (max-let-depth binding-namess prefix form))
(define-values (reqs new-forms)
(partition req? (splice-forms form)))
(define requires
(map (compose ->module-path-index stx-obj-datum stx-content req-reqs) reqs))
(make-compilation-top
0
#hash()
(make-prefix 0 (list #f) empty (prefix-src-inspector-desc prefix))
(make-mod name srcname
self-modidx
prefix
empty ; provides
(list (cons 0 requires))
new-forms
empty ; syntax-body
(list) ; unexported
max-let-depth
(make-toplevel 0 0 #f #f) ; dummy
lang-info
#t
(hash) ; no names visible via `module->namespace`
empty
empty
empty))]))
(provide/contract
[wrap-in-kernel-module (symbol? symbol? lang-info/c module-path-index? compilation-top? . -> . compilation-top?)])

View File

@ -0,0 +1,41 @@
#lang racket/base
(require racket/contract
syntax/modresolve)
(define current-module-path (make-parameter #f))
(define (mpi->string modidx)
(cond
[(symbol? modidx) modidx]
[else
(mpi->path! modidx)]))
(define MODULE-PATHS (make-parameter #f))
(define (mpi->path! mpi)
(hash-ref!
(MODULE-PATHS) mpi
(lambda ()
(define _pth
(resolve-module-path-index mpi (current-module-path)))
(cond
[(path? _pth) (simplify-path _pth #t)]
[(and (pair? _pth)
(path? (cadr _pth)))
(list* 'submod (simplify-path (cadr _pth) #t) (cddr _pth))]
[else _pth]))))
(define (mpi->path* mpi)
(hash-ref (MODULE-PATHS) mpi
(lambda ()
(error 'mpi->path* "Cannot locate cache of path for ~S" mpi))))
(define submod-path/c
(cons/c 'submod
(cons/c (or/c symbol? path?)
(listof symbol?))))
(provide/contract
[MODULE-PATHS (parameter/c (or/c false/c hash?))]
[current-module-path (parameter/c (or/c path-string? submod-path/c))]
[mpi->path! (module-path-index? . -> . (or/c symbol? path? submod-path/c))]
[mpi->path* (module-path-index? . -> . (or/c symbol? path? pair? submod-path/c))])

View File

@ -0,0 +1,228 @@
#lang racket/base
(require racket/list
racket/match
racket/contract
compiler/zo-parse
"util.rkt"
"mpi.rkt"
racket/set)
(define current-excluded-modules (make-parameter (set)))
(define ZOS (make-parameter #f))
(define MODULE-IDX-MAP (make-parameter #f))
(define PHASE*MODULE-CACHE (make-parameter #f))
(define (nodep-file file-to-batch)
(define idx-map (make-hash))
(parameterize ([ZOS (make-hash)]
[MODULE-IDX-MAP idx-map]
[PHASE*MODULE-CACHE (make-hasheq)])
(define (get-modvar-rewrite modidx)
(define pth (mpi->path* modidx))
(hash-ref idx-map pth
(lambda ()
(error 'get-modvar-rewrite "Cannot locate modvar rewrite for ~S" pth))))
(match (get-nodep-module-code/path file-to-batch 0)
[(struct @phase (_ (struct module-code (modvar-rewrite lang-info ctop))))
(values ctop lang-info (modvar-rewrite-modidx modvar-rewrite) get-modvar-rewrite)])))
(define (path->comp-top pth submod)
(hash-ref! (ZOS) (cons pth submod)
(λ ()
(define zo (call-with-input-file pth zo-parse))
(if submod
(extract-submod zo submod)
zo))))
(define (extract-submod zo submod)
(define m (compilation-top-code zo))
(struct-copy compilation-top
zo
[code (let loop ([m m])
(if (and (pair? (mod-name m))
(equal? submod (cdr (mod-name m))))
m
(or (ormap loop (mod-pre-submodules m))
(ormap loop (mod-post-submodules m)))))]))
(define (excluded? pth)
(and (path? pth)
(set-member? (current-excluded-modules) (path->string pth))))
(define (get-nodep-module-code/index mpi phase)
(define pth (mpi->path! mpi))
(cond
[(symbol? pth)
(hash-set! (MODULE-IDX-MAP) pth pth)
pth]
[(excluded? pth)
(hash-set! (MODULE-IDX-MAP) pth mpi)
mpi]
[else
(get-nodep-module-code/path pth phase)]))
(define-struct @phase (phase code))
(define-struct modvar-rewrite (modidx provide->toplevel))
(define-struct module-code (modvar-rewrite lang-info ctop))
(define @phase-ctop (compose module-code-ctop @phase-code))
(define (get-nodep-module-code/path pth phase)
(define MODULE-CACHE
(hash-ref! (PHASE*MODULE-CACHE) phase make-hash))
(if (hash-ref MODULE-CACHE pth #f)
#f
(hash-ref!
MODULE-CACHE pth
(lambda ()
(define-values (base file dir?) (split-path (if (path-string? pth)
pth
(cadr pth))))
(define base-directory
(if (path? base)
(path->complete-path base (current-directory))
(current-directory)))
(define-values (modvar-rewrite lang-info ctop)
(begin
(log-debug (format "Load ~S @ ~S" pth phase))
(nodep/dir
(parameterize ([current-load-relative-directory base-directory])
(path->comp-top
(build-compiled-path
base
(path-add-suffix file #".zo"))
(and (pair? pth) (cddr pth))))
pth
phase)))
(when (and phase (zero? phase))
(hash-set! (MODULE-IDX-MAP) pth modvar-rewrite))
(make-@phase
phase
(make-module-code modvar-rewrite lang-info ctop))))))
(define (nodep/dir top pth phase)
(define pth*
(cond
[(string? pth) (string->path pth)]
[(list? pth) (cadr pth)]
[else pth]))
(parameterize ([current-module-path pth*])
(nodep top phase)))
(define (nodep top phase)
(match top
[(struct compilation-top (max-let-depth binding-namess prefix form))
(define-values (modvar-rewrite lang-info new-form) (nodep-form form phase))
(values modvar-rewrite lang-info (make-compilation-top max-let-depth #hash() prefix new-form))]
[else (error 'nodep "unrecognized: ~e" top)]))
(define (nodep-form form phase)
(if (mod? form)
(let-values ([(modvar-rewrite lang-info mods)
(nodep-module form phase)])
(values modvar-rewrite lang-info (make-splice mods)))
(error 'nodep-form "Doesn't support non mod forms")))
; XXX interning is hack to fix test/add04.ss and provide/contract renaming
(define (intern s) (string->symbol (symbol->string s)))
(define (construct-provide->toplevel prefix provides)
(define provide-ht (make-hasheq))
(for ([tl (prefix-toplevels prefix)]
[i (in-naturals)])
(when (symbol? tl)
(hash-set! provide-ht (intern tl) i)))
(lambda (sym pos)
(define isym (intern sym))
(log-debug (format "Looking up ~S@~a [~S] in ~S" sym pos isym prefix))
(define res
(hash-ref provide-ht isym
(lambda ()
(error 'provide->toplevel "Cannot find ~S in ~S" sym prefix))))
(log-debug (format "Looked up ~S@~a and got ~v" sym pos res))
res))
(define (nodep-module mod-form phase)
(match mod-form
[(struct mod (name srcname self-modidx
prefix provides requires body syntax-bodies
unexported max-let-depth dummy lang-info
internal-context binding-names
flags pre-submodules post-submodules))
(define new-prefix prefix)
;; Cache all the mpi paths
(for-each (match-lambda
[(and mv (struct module-variable (modidx sym pos phase constantness)))
(mpi->path! modidx)]
[tl
(void)])
(prefix-toplevels new-prefix))
(define mvs (filter module-variable? (prefix-toplevels new-prefix)))
(log-debug (format "[~S] module-variables: ~S - ~S" name (length mvs) mvs))
(values (make-modvar-rewrite self-modidx (construct-provide->toplevel new-prefix provides))
lang-info
(append (requires->modlist requires phase)
(if (and phase (zero? phase))
(begin (log-debug (format "[~S] lang-info : ~S" name lang-info)) ; XXX Seems to always be #f now
(list (make-mod name srcname self-modidx
new-prefix provides requires body empty
unexported max-let-depth dummy lang-info internal-context #hash()
empty empty empty)))
(begin (log-debug (format "[~S] Dropping module @ ~S" name phase))
empty))))]
[else (error 'nodep-module "huh?: ~e" mod-form)]))
(define (+* l r)
(if (and l r) (+ l r) #f))
(define (requires->modlist requires current-phase)
(apply append
(map
(match-lambda
[(list-rest req-phase mpis)
(define phase (+* current-phase req-phase))
(apply append
(map (compose extract-modules (lambda (mpi) (get-nodep-module-code/index mpi phase))) mpis))])
requires)))
(define (all-but-last l)
(reverse (rest (reverse l))))
(define REQUIRED (make-hasheq))
(define (extract-modules ct)
(cond
[(compilation-top? ct)
(match (compilation-top-code ct)
[(and m (? mod?))
(list m)]
[(struct splice (mods))
mods])]
[(symbol? ct)
(if (hash-has-key? REQUIRED ct)
empty
(begin
(hash-set! REQUIRED ct #t)
(list (make-req (make-stx (make-stx-obj ct (wrap empty empty empty) #f #hasheq() 'clean)) (make-toplevel 0 0 #f #f)))))]
[(module-path-index? ct)
(if (hash-has-key? REQUIRED ct)
empty
(begin
(hash-set! REQUIRED ct #t)
(list (make-req (make-stx (make-stx-obj ct (wrap empty empty empty) #f #hasheq() 'clean)) (make-toplevel 0 0 #f #f)))))]
[(not ct)
empty]
[(@phase? ct)
(extract-modules (@phase-ctop ct))]
[else
(error 'extract-modules "Unknown extraction: ~S" ct)]))
(define get-modvar-rewrite/c
(module-path-index? . -> . (or/c symbol? modvar-rewrite? module-path-index?)))
(provide/contract
[struct modvar-rewrite
([modidx module-path-index?]
[provide->toplevel (symbol? exact-nonnegative-integer? . -> . exact-nonnegative-integer?)])]
[get-modvar-rewrite/c contract?]
[current-excluded-modules (parameter/c generic-set?)]
[nodep-file (-> path-string?
(values compilation-top? lang-info/c module-path-index? get-modvar-rewrite/c))])

View File

@ -0,0 +1,29 @@
#lang racket/base
(require racket/match
racket/vector
racket/struct
"util.rkt")
(provide replace-modidx)
(define (replace-modidx expr self-modidx)
(define (inner-update e)
(match e
[(app prefab-struct-key (and key (not #f)))
(apply make-prefab-struct key
(map update
(struct->list e)))]
[(? module-path-index?)
(define-values (path mpi) (module-path-index-split e))
(if (not path)
self-modidx
(module-path-index-join path (update mpi)))]
[(cons a b)
(cons (update a) (update b))]
[(? vector?)
(vector-map update e)]
[else e]))
(define-values (first-update update)
(build-form-memo inner-update))
(first-update expr))

View File

@ -0,0 +1,108 @@
#lang racket/base
(require racket/match
racket/contract
compiler/zo-structs
"util.rkt")
(define (update-toplevels toplevel-updater topsyntax-updater topsyntax-new-midpt)
(define (inner-update form)
(match form
[(struct def-values (ids rhs))
(make-def-values (map update ids)
(update rhs))]
[(? def-syntaxes?)
(error 'increment "Doesn't handle syntax")]
[(? seq-for-syntax?)
(error 'increment "Doesn't handle syntax")]
[(struct inline-variant (direct inline))
(update direct)]
[(struct req (reqs dummy))
(make-req reqs (update dummy))]
[(? mod?)
(error 'increment "Doesn't handle modules")]
[(struct seq (forms))
(make-seq (map update forms))]
[(struct splice (forms))
(make-splice (map update forms))]
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
(struct-copy lam l
[toplevel-map #f] ; conservative
[body (update body)])]
[(and c (struct closure (code gen-id)))
(struct-copy closure c
[code (update code)])]
[(and cl (struct case-lam (name clauses)))
(define new-clauses
(map update clauses))
(struct-copy case-lam cl
[clauses new-clauses])]
[(struct let-one (rhs body type unused?))
(make-let-one (update rhs) (update body) type unused?)]
[(and f (struct let-void (count boxes? body)))
(struct-copy let-void f
[body (update body)])]
[(and f (struct install-value (_ _ _ rhs body)))
(struct-copy install-value f
[rhs (update rhs)]
[body (update body)])]
[(struct let-rec (procs body))
(make-let-rec (map update procs) (update body))]
[(and f (struct boxenv (_ body)))
(struct-copy boxenv f [body (update body)])]
[(and f (struct toplevel (_ pos _ _)))
(struct-copy toplevel f
[pos (toplevel-updater pos)])]
[(and f (struct topsyntax (_ pos _)))
(struct-copy topsyntax f
[pos (topsyntax-updater pos)]
[midpt topsyntax-new-midpt])]
[(struct application (rator rands))
(make-application
(update rator)
(map update rands))]
[(struct branch (test then else))
(make-branch
(update test)
(update then)
(update else))]
[(struct with-cont-mark (key val body))
(make-with-cont-mark
(update key)
(update val)
(update body))]
[(struct with-immed-mark (key val body))
(make-with-immed-mark
(update key)
(update val)
(update body))]
[(struct beg0 (seq))
(make-beg0 (map update seq))]
[(struct varref (tl dummy))
(make-varref (update tl) (update dummy))]
[(and f (struct assign (id rhs undef-ok?)))
(struct-copy assign f
[id (update id)]
[rhs (update rhs)])]
[(struct apply-values (proc args-expr))
(make-apply-values
(update proc)
(update args-expr))]
[(and f (struct primval (id)))
f]
[(and f (struct localref (unbox? pos clear? other-clears? type)))
f]
[(and f (not (? form?)))
f]
))
(define-values (first-update update)
(build-form-memo inner-update))
first-update)
(provide/contract
[update-toplevels
((exact-nonnegative-integer? . -> . exact-nonnegative-integer?)
(exact-nonnegative-integer? . -> . exact-nonnegative-integer?)
exact-nonnegative-integer?
. -> .
(form? . -> . form?))])

View File

@ -0,0 +1,79 @@
#lang racket/base
(require racket/contract
compiler/zo-parse)
(define (prefix-syntax-start pre)
(length (prefix-toplevels pre)))
(define (prefix-lift-start pre)
(define syntax-start (prefix-syntax-start pre))
(define total-stxs (length (prefix-stxs pre)))
(+ syntax-start total-stxs (if (zero? total-stxs) 0 1)))
(struct nothing ())
(define-syntax-rule (eprintf* . args) (void))
(define (build-form-memo inner-update #:void? [void? #f])
(define memo (make-hasheq))
(define (update form . args)
(eprintf* "Updating on ~a\n" form)
(define fin
(cond
[(hash-ref memo form #f)
=> (λ (x)
(eprintf* "Found in memo table\n")
x)]
[else
(eprintf* "Not in memo table\n")
(let ()
(define ph (make-placeholder (nothing)))
(hash-set! memo form ph)
(define nv (nothing))
(dynamic-wind void
(λ ()
(set! nv (apply inner-update form args)))
(λ ()
(if (nothing? nv)
(eprintf* "inner-update returned nothing (or there was an escape) on ~a\n" form)
(begin
(placeholder-set! ph nv)
(hash-set! memo form nv)))))
nv)]))
(eprintf* "Updating on ~a ---->\n ~a\n" form fin)
fin)
(define (first-update form . args)
(eprintf* "Top level update on ~a\n" form)
(define final (apply update form args))
(eprintf* "Top level update on ~a ---->\n ~a\n" form final)
(define fin (make-reader-graph final))
(eprintf* "Top level update on ~a ---->\n ~a [after reader-graph]\n" form fin)
fin)
(values first-update update))
(define lang-info/c
(or/c #f (vector/c module-path? symbol? any/c)))
(define (build-compiled-path base name)
(build-path
(cond [(path? base) base]
[(eq? base 'relative) 'same]
[(eq? base #f) (error 'batch "Impossible")])
"compiled"
name))
(provide/contract
[prefix-syntax-start (prefix? . -> . exact-nonnegative-integer?)]
[prefix-lift-start (prefix? . -> . exact-nonnegative-integer?)]
[eprintf ((string?) () #:rest (listof any/c) . ->* . void)]
[build-form-memo
(((unconstrained-domain-> any/c))
(#:void? boolean?)
. ->* .
(values (unconstrained-domain-> any/c)
(unconstrained-domain-> any/c)))]
[lang-info/c contract?]
[build-compiled-path ((or/c path-string? (symbols 'relative) false/c) path-string? . -> . (or/c path-string? (symbols 'same 'up)))])

View File

@ -0,0 +1,13 @@
(module embed-sig racket/base
(require racket/unit)
(provide compiler:embed^)
(define-signature compiler:embed^
(create-embedding-executable
make-embedding-executable
write-module-bundle
embedding-executable-is-directory?
embedding-executable-is-actually-directory?
embedding-executable-put-file-extension+style+filters
embedding-executable-add-suffix)))

View File

@ -0,0 +1,9 @@
#lang racket/base
(require racket/unit
racket/contract
"sig.rkt"
compiler/embed
"embed-sig.rkt")
(define-unit-from-context compiler:embed@ compiler:embed^)
(provide compiler:embed@)

View File

@ -0,0 +1,7 @@
#lang racket/base
(require racket/unit compiler/sig compiler/option)
(provide compiler:option@)
(define-unit-from-context compiler:option@ compiler:option^)

View File

@ -0,0 +1,39 @@
#lang racket/base
(require racket/unit)
(provide compiler:option^
compiler^)
;; Compiler options
(define-signature compiler:option^
(somewhat-verbose ; default = #f
verbose ; default = #f
setup-prefix ; string to embed in public names;
; used mainly for compiling extensions
; with the collection name so that
; cross-extension conflicts are less
; likely in architectures that expose
; the public names of loaded extensions
; default = ""
3m ; #t => build for 3m
; default = #f
compile-subcollections ; #t => compile collection subdirectories
; default = #t
))
;; Compiler procedures
(define-signature compiler^
(compile-zos
compile-collection-zos
compile-directory-zos
compile-directory-srcs
current-compiler-dynamic-require-wrapper
compile-notify-handler))

View File

@ -0,0 +1,16 @@
#lang info
(define collection 'multi)
(define deps '(["base" #:version "6.5.0.2"]
"scheme-lib"
"rackunit-lib"
"zo-lib"))
(define implies '("zo-lib"))
(define pkg-desc "implementation (no documentation) part of \"compiler\"")
(define pkg-authors '(mflatt))
(define version "1.4")

View File

@ -0,0 +1,57 @@
#lang racket/signature
make-gracket-launcher
make-racket-launcher
make-mred-launcher
make-mzscheme-launcher
make-gracket-program-launcher
make-racket-program-launcher
make-mred-program-launcher
make-mzscheme-program-launcher
gracket-program-launcher-path
racket-program-launcher-path
mred-program-launcher-path
mzscheme-program-launcher-path
install-gracket-program-launcher
install-racket-program-launcher
install-mred-program-launcher
install-mzscheme-program-launcher
gracket-launcher-up-to-date?
racket-launcher-up-to-date?
mred-launcher-up-to-date?
mzscheme-launcher-up-to-date?
gracket-launcher-is-directory?
racket-launcher-is-directory?
mred-launcher-is-directory?
mzscheme-launcher-is-directory?
gracket-launcher-is-actually-directory?
racket-launcher-is-actually-directory?
mred-launcher-is-actually-directory?
mzscheme-launcher-is-actually-directory?
gracket-launcher-add-suffix
racket-launcher-add-suffix
mred-launcher-add-suffix
mzscheme-launcher-add-suffix
gracket-launcher-put-file-extension+style+filters
racket-launcher-put-file-extension+style+filters
mred-launcher-put-file-extension+style+filters
mzscheme-launcher-put-file-extension+style+filters
build-aux-from-path
extract-aux-from-path
current-launcher-variant
available-mred-variants
available-mzscheme-variants
available-gracket-variants
available-racket-variants
installed-executable-path->desktop-path
installed-desktop-path->icon-path

View File

@ -0,0 +1,7 @@
#lang racket/base
(require racket/unit "launcher-sig.rkt" launcher/launcher)
(provide launcher@)
(define-unit-from-context launcher@ launcher^)

View File

@ -0,0 +1,37 @@
(module option-sig racket/base
(require racket/unit)
(provide setup-option^)
(define-signature setup-option^
(setup-program-name
verbose
make-verbose
compiler-verbose
clean
compile-mode
make-only
make-zo
make-info-domain
make-foreign-libs
make-launchers
make-docs
make-user
make-planet
avoid-main-installation
make-tidy
make-doc-index
check-dependencies
fix-dependencies
call-install
call-post-install
pause-on-errors
parallel-workers
force-unpacks
doc-pdf-dest
specific-collections
specific-planet-dirs
archives
archive-implies-reindex
current-target-directory-getter
current-target-plt-directory-getter)))

View File

@ -0,0 +1,6 @@
#lang racket/base
(require racket/unit setup/option "option-sig.rkt")
(provide setup:option@ set-flag-params)
(define-unit-from-context setup:option@ setup-option^)

View File

@ -0,0 +1,9 @@
#lang racket/base
(require racket/unit setup/setup-core)
(provide setup@)
(define-unit setup@
(import)
(export)
(setup-core))

View File

@ -0,0 +1,11 @@
compiler-test
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -0,0 +1,20 @@
#lang info
(define collection 'multi)
(define deps '("base"))
(define pkg-desc "tests for \"compiler-lib\"")
(define pkg-authors '(mflatt))
(define build-deps '("compiler-lib"
"eli-tester"
"rackunit-lib"
"net-lib"
"scheme-lib"
"compatibility-lib"
"gui-lib"
"htdp-lib"
"plai-lib"
"rackunit-lib"))
(define update-implies '("compiler-lib"))

View File

@ -0,0 +1,5 @@
#lang racket
(require compiler/compiler)
;; minimal sanity check:
(compile-collection-zos "setup")

View File

@ -0,0 +1,5 @@
#lang racket
(require rackunit)
(require (only-in (submod compiler/commands/test paths) collection-paths))
(check-exn exn? (lambda () (collection-paths ".")))

View File

@ -0,0 +1,19 @@
#lang racket
(require setup/dirs)
(define raco (build-path (find-console-bin-dir)
(if (eq? (system-type) 'windows)
"raco.exe"
"raco")))
(define tmp (make-temporary-file))
(system* raco
"ctool"
"--3m"
"--c-mods"
tmp
"++lib"
"racket")
(delete-file tmp)

View File

@ -0,0 +1,53 @@
#lang racket
(require tests/eli-tester
racket/runtime-path
compiler/find-exe)
(define (capture-output command . args)
(define o (open-output-string))
(define e (open-output-string))
(parameterize ([current-input-port (open-input-string "")]
[current-output-port o]
[current-error-port e])
(apply system* command args))
(values (get-output-string o) (get-output-string e)))
(define (test-on-program filename)
;; run modular program, capture output
(define-values (modular-output modular-error)
(capture-output (find-exe) filename))
(define demod-filename
(let-values ([(base filename dir?) (split-path filename)])
(path->string
(build-path
(find-system-path 'temp-dir)
(path-add-suffix filename #"_merged.zo")))))
;; demodularize
(parameterize ([current-input-port (open-input-string "")])
(system* (find-exe) "-l-" "raco" "demod" "-o" demod-filename filename))
;; run whole program
(define-values (whole-output whole-error)
(capture-output (find-exe) demod-filename))
;; compare output
(test
#:failure-prefix (format "~a stdout" filename)
whole-output => modular-output
#:failure-prefix (format "~a stderr" filename)
whole-error => modular-error))
(define-runtime-path tests "tests")
(define (modular-program? filename)
(and (not (regexp-match #rx"merged" filename))
(regexp-match #rx"rkt$" filename)))
(test
(for ([i (in-list (directory-list tests))])
(define ip (build-path tests i))
(when (modular-program? ip)
(printf "Checking ~a\n" ip)
(test-on-program (path->string ip)))))

View File

@ -0,0 +1,3 @@
#lang info
(define test-timeouts '(("demod-test.rkt" 300)))

View File

@ -0,0 +1,2 @@
#lang racket/base
5

View File

@ -0,0 +1,5 @@
(module kernel-5 '#%kernel
(#%require racket/private/map)
(define-values (id) (λ (x) x))
(define-values (xs) (list 1 2 3 4 5))
(map id (map id xs)))

View File

@ -0,0 +1,2 @@
#lang racket
5

View File

@ -0,0 +1,4 @@
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
10

View File

@ -0,0 +1,4 @@
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
10

View File

@ -0,0 +1,4 @@
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
10

View File

@ -0,0 +1,4 @@
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
10

View File

@ -0,0 +1,4 @@
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
10

View File

@ -0,0 +1,5 @@
(module embed-me1 mzscheme
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1\n"))
'append))

View File

@ -0,0 +1,9 @@
(module embed-me10 mzscheme
(require openssl/mzssl)
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "~a\n" ssl-available?))
'append))

View File

@ -0,0 +1,15 @@
(module embed-me11-rd mzscheme
(provide (rename *read-syntax read-syntax)
(rename *read read))
(define (*read port)
`(module embed-me11 mzscheme
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf ,(read port)
;; Use `getenv' at read time!!!
,(getenv "ELEVEN")))
'append)))
(define (*read-syntax src port)
(*read port)))

View File

@ -0,0 +1,2 @@
#reader(lib "embed-me11-rd.ss" "tests" "compiler" "embed")
"It goes to ~a!\n"

View File

@ -0,0 +1,15 @@
(module embed-me11-rd mzscheme
(provide (rename *read-syntax read-syntax)
(rename *read read))
(define (*read port)
`(module embed-me11 mzscheme
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf ,(read port)
;; Use `getenv' at read time!!!
,(getenv "ELEVEN")))
'append)))
(define (*read-syntax src port)
(*read port)))

View File

@ -0,0 +1,2 @@
#reader(lib "embed-me12-rd.rkt" "tests" "compiler" "embed")
"It goes to ~a!\n"

View File

@ -0,0 +1,4 @@
#lang racket/base
(require racket/runtime-path)
(define-runtime-module-path-index _mod "embed-me14.rkt")
(dynamic-require _mod #f)

View File

@ -0,0 +1,5 @@
#lang racket/base
(require "embed-me13.rkt")
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 14\n"))
#:exists 'append)

View File

@ -0,0 +1,13 @@
#lang racket/base
(define two 2)
(provide two)
(module* one #f
(require (submod "." ".." three))
(define one 1)
(provide one two three))
(module three racket/base
(define three 3)
(provide three))

View File

@ -0,0 +1,5 @@
#lang racket/base
(require (submod "embed-me15-one.rkt" one))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
#:exists 'append)

View File

@ -0,0 +1,7 @@
#lang racket/base
;; a `main' submodule:
(module main racket/base
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 16.\n"))
#:exists 'append))

View File

@ -0,0 +1,2 @@
#lang racket/base
(require (submod "embed-me17a.rkt" sub))

View File

@ -0,0 +1,9 @@
#lang racket
(define print-17
(lambda () (printf "This is 17.\n")))
(module+ sub
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
print-17
#:exists 'append))

View File

@ -0,0 +1,5 @@
#lang racket/base
(require (submod tests/compiler/embed/embed-me18a sub))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(dynamic-require '(submod tests/compiler/embed/embed-me18a sub) 'print-18)
#:exists 'append)

View File

@ -0,0 +1,9 @@
#lang racket/base
(module sub racket/base
(provide print-18)
(define (print-18)
(printf "This is 18.\n")))

View File

@ -0,0 +1,14 @@
#lang racket/base
(require racket/runtime-path)
(define-runtime-module-path plai plai)
(define-runtime-module-path plai-reader plai/lang/reader)
(define-runtime-module-path runtime racket/runtime-config)
(parameterize ([read-accept-reader #t])
(namespace-require 'racket/base)
(eval (read (open-input-string "#lang plai 10"))))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 19.\n"))
#:exists 'append)

View File

@ -0,0 +1,9 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "icons/file.gif"))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1b\n"))
#:exists 'append)

View File

@ -0,0 +1,9 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "etc.ss")) ; in mzlib
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1c\n"))
#:exists 'append)

View File

@ -0,0 +1,8 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "file.gif" "icons"))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1d\n"))
#:exists 'append)

View File

@ -0,0 +1,8 @@
#lang scheme/base
(require scheme/runtime-path
(for-syntax scheme/base))
(define-runtime-path file '(lib "html"))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 1e\n"))
#:exists 'append)

View File

@ -0,0 +1,12 @@
#lang scheme/base
(require scheme/runtime-path)
;; Check that relative paths are preserved:
(define-runtime-path f1 "embed-me1f1.rktl")
(define-runtime-path f2 "sub/embed-me1f2.rktl")
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (parameterize ([current-namespace (make-base-namespace)])
(load f1)))
#:exists 'append)

View File

@ -0,0 +1 @@
(load-relative "sub/embed-me1f2.rktl")

View File

@ -0,0 +1,6 @@
(module embed-me2 mzscheme
(require "embed-me1.ss"
mzlib/etc)
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 2: ~a\n" true))
'append))

View File

@ -0,0 +1,7 @@
#lang racket/base
;; like "embed-me16.rkt" using `module+'
(module+ main
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 20.\n"))
#:exists 'append))

View File

@ -0,0 +1,12 @@
#lang racket/base
(require racket/match)
;; check using `racket/match', particularly with a pattern
;; that eneds run-time support that may go through a
;; compile-time `lazy-require':
(match "x"
[(pregexp "x")
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 21.\n"))
#:exists 'append)])

View File

@ -0,0 +1,6 @@
#lang racket/kernel
(printf "This is 22.\n")
(module configure-runtime racket/kernel
(printf "Configure!\n"))

View File

@ -0,0 +1,8 @@
#lang racket/base
(require racket/serialize)
(serializable-struct foo (a b))
(define f (deserialize (serialize (foo 1 2))))
(foo-a f)
(foo-b f)

View File

@ -0,0 +1,3 @@
#lang racket
"Ok"

View File

@ -0,0 +1,9 @@
#lang racket/base
(module+ main
12)
(module submod racket/base
11)
10

View File

@ -0,0 +1,10 @@
#lang racket/base
(module+ main
12)
(module submod racket/base
11)
10
(require (submod "embed-me27.rkt" other-submod))

View File

@ -0,0 +1,3 @@
#lang racket/base
(module+ other-submod 'y)

View File

@ -0,0 +1,14 @@
#lang racket/base
(require racket/place)
(define (go)
(place pch
(place-channel-put pch 28)))
(module+ main
(define p (go))
(define n (place-channel-get p))
(void (place-wait p))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "~a\n" n))
#:exists 'append))

View File

@ -0,0 +1,5 @@
#lang racket/base
(module inside racket/base
(define inside 'inside)
(provide inside))

View File

@ -0,0 +1,5 @@
#lang racket/base
(module main racket/base
(require (submod "embed-me29-2.rkt" inside))
inside)

View File

@ -0,0 +1,7 @@
(module embed-me3 mzscheme
(require mzlib/etc)
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "3 is here, too? ~a\n" true))
'append))

View File

@ -0,0 +1,4 @@
(with-output-to-file "stdout"
(lambda () (printf "This is the literal expression 4.\n"))
'append)

View File

@ -0,0 +1,6 @@
(module embed-me5 mzscheme
(require mred)
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda () (printf "This is 5: ~s\n" button%))
'append))

View File

@ -0,0 +1,8 @@
(module embed-me6 mzscheme
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "This is 6\n")
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
(printf "~a\n" (dynamic-require 'mzlib/etc 'true))))
'append))

View File

@ -0,0 +1,8 @@
(module embed-me6b racket/base
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "This is 6\n")
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
(printf "~a\n" (and (dynamic-require 'racket/fixnum #f) #t))))
#:exists 'append))

View File

@ -0,0 +1,31 @@
#include "escheme.h"
Scheme_Object *ex(int argc, Scheme_Object **argv)
{
return scheme_make_utf8_string("Hello, world!");
}
Scheme_Object *scheme_reload(Scheme_Env *env)
{
Scheme_Env *menv;
menv = scheme_primitive_module(scheme_intern_symbol("embed-me8"),
env);
scheme_add_global("ex", scheme_make_prim_w_arity(ex, "ex", 0, 0), menv);
scheme_finish_primitive_module(menv);
return scheme_void;
}
Scheme_Object *scheme_initialize(Scheme_Env *env)
{
/* First load is same as every load: */
return scheme_reload(env);
}
Scheme_Object *scheme_module_name()
{
return scheme_intern_symbol("embed-me8");
}

View File

@ -0,0 +1,9 @@
(module embed-me9 mzscheme
(require "embed-me8.ss")
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
(lambda ()
(printf "~a\n" (ex)))
'append)
(module test racket/base))

View File

@ -0,0 +1,7 @@
#lang racket/base
(require racket/place)
(provide go)
(define (go ch)
(place-channel-put ch 42))

View File

@ -0,0 +1,6 @@
#lang racket/base
(require "main.rkt")
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln "alt")))

View File

@ -0,0 +1,8 @@
#lang racket/base
(require (submod (planet racket-tester/p1/has-sub) the-sub))
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
#:exists 'append
(lambda () (displayln (dynamic-require
'(submod (planet racket-tester/p1/has-sub) the-sub)
'out))))

Some files were not shown because too many files have changed in this diff Show More