Commit Graph

746 Commits

Author SHA1 Message Date
Matthew Flatt
d3c56c9f13 generalized `begin-for-syntax' 2011-09-08 14:06:00 -06:00
Kevin Tew
261f002ce2 Error messages for using places with symbol module paths 2011-09-01 12:02:20 -06:00
James Ian Johnson
3f23a67d57 Fixed the duplicate identifier bug in match-define-values and changed identifiers to conform to naming conventions. 2011-08-31 22:27:02 -04:00
James Ian Johnson
dc61372f3c Implemented Sam's suggested changes for new forms, and added a new match/values form. 2011-08-31 21:45:21 -04:00
James Ian Johnson
93e1b634a3 Added let and define forms that generalize let-values, let*-values and define-values 2011-08-31 21:45:21 -04:00
Kevin Tew
b110671c5c Comment out broken place check 2011-08-30 16:21:32 -06:00
Robby Findler
0fbed43a26 Fix 'place's handling of the result of resolved-module-path-name
Plus minor cleanups:
 - fixed indentation
 - removed useless gen-create-place function
 - avoid using the guard position of syntax-case
 - drop useless datum->syntax call (it returns syntax
      objects unmodified and generate-temporary
      returns a syntax object)
 - "interal" => "internal"
 - minimized the generated code (move into a function call)
 - check to make sure constructed lambda expression is well-formed
 - check to make sure 'place' is used inside a module (or else
   several other things it use will fail)
2011-08-30 14:46:02 -05:00
Ryan Culpepper
c13c22f0e4 fixed missing arg to raise-type-error 2011-08-30 12:04:24 -06:00
Eli Barzilay
14357370dd Some small improvements. 2011-08-29 22:12:07 -04:00
Eli Barzilay
187110cc2c Change default temporary format from "mztmp~a" to "rkttmp~a". 2011-08-29 20:53:57 -04:00
Robby Findler
d4f4f754f1 make make-temporary-file use the source location for its template argument
(This involves making make-temporary-file be a macro instead of a procedure.)
2011-08-29 19:36:33 -05:00
Matthew Flatt
733d6b97ff make libs dir to readable by default for sandboxed code
One example use is the handin server, where the ssl library
is needed to run some programs in my class. (I didn't figure
out exactly why, but it seems reasonable.)
2011-08-26 19:31:06 -06:00
Matthew Flatt
71b500b49f speed up mult/unmult in `{get,set}-argb-pixels'
Also add test cases to check consistency of the results.
2011-08-26 09:13:28 -06:00
Matthew Flatt
cc82506be5 fix alpha mult in `set-argb-pixels' 2011-08-26 07:06:31 -06:00
Matthew Flatt
ce7c0d62c3 if only a Unix root is shared, don't make a path relative 2011-08-24 20:08:20 -06:00
Matthew Flatt
a7855e20a8 add `raco link'
includes a rewrite the "Module Basics" section of the Guide
2011-08-24 09:07:14 -06:00
Robby Findler
6c91288f2f speed up bitmap rotation (could probably revisit this to
speed up flipping (and also to do all three in one pass)
2011-08-23 18:56:51 -05:00
Eli Barzilay
a0baee8ab9 Sandbox fixes
* When `accept-lang?' is #t turn the reader flag on, but otherwise don't
  change it
* turn on the `read-accept-reader' flag which is needed after all
* two refactoring typos
* some more reformatting
2011-08-20 16:14:01 -04:00
Eli Barzilay
bc0c466233 Some more let' -> define' uses. 2011-08-20 06:26:40 -04:00
Eli Barzilay
da3c6c9be2 Set read-accept-lang' to #t when reading a module in make-module-evaluator'.
Also, some reformatting including uses of `define'.
2011-08-20 06:12:55 -04:00
Eli Barzilay
dc2e4352e0 Add some extra safety when using ns' for the namespace, get rid of factored away unnecessary r' binding. 2011-08-20 05:38:54 -04:00
Matthew Flatt
11f5c84493 fix make-lock-file-name'; add path-element?' 2011-08-19 15:46:44 -06:00
Matthew Flatt
dfd58a2cdd adjust sandbox to give S-expression input "original" status 2011-08-17 06:22:27 -06:00
Matthew Flatt
a95ce7dc5a remove debugging output 2011-08-15 06:45:42 -06:00
Sam Tobin-Hochstadt
25084de5a7 Use regular define for `open-input-file' and friends. 2011-08-14 13:40:41 -04:00
Sam Tobin-Hochstadt
5f29dcdc23 Make keyword procedure syntax bindings structs with accessors for higher-order and core implementations. 2011-08-14 13:40:41 -04:00
Matthew Flatt
5be429dc99 fix procedure-name inference for keyword procedures
Closes PR 12111
2011-08-13 08:27:20 -06:00
Matthew Flatt
ce4286c722 fix bug in keyword-argument calls
Closes PR 12104
2011-08-12 07:24:39 -06:00
Matthew Flatt
c81222e4c8 fix `call-with-file-lock/timeout' checking 2011-08-11 13:23:24 -06:00
Matthew Flatt
1c04cf1b02 make `port-try-file-lock?' work for Solaris
Shared locking now allowed only on input port, and exclusive
locking is allowed only on output ports, which allows an implementation
via fcntl(...,F_SETLK,...).
2011-08-11 13:11:26 -06:00
Robby Findler
997813680d change the #:get-lock-file argument of call-with-file-lock/timeout to #:lock-file 2011-08-11 09:29:31 -05:00
Robby Findler
78a999537d clean up the contract checking for call-with-file-lock/timeout 2011-08-11 09:29:30 -05:00
Matthew Flatt
2d06f4247f keyword-function repairs 2011-08-09 16:33:17 -06:00
Matthew Flatt
001cb75bac syntax-taint repairs
for problems exposed by more agressive arming of `lambda'
and `#%app'
2011-08-09 16:33:17 -06:00
Matthew Flatt
f646511ca7 first small step toward cross-module optimization
Mainly propagates constantness for the benefit of keyword
applications, but also propagates simple constants
2011-08-09 16:33:17 -06:00
Matthew Flatt
5352d670c4 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.
2011-08-09 16:33:17 -06:00
Matthew Flatt
39a96dd699 add `prop:liberal-define-context' 2011-08-09 16:33:16 -06:00
Matthew Flatt
3b031d6c87 `define' + keyword lambda at top/module level => static checking
When `define' binds a keyword procedure at the top level or module
level, then it actually binds syntax that checks (i.e., warns
if arith or keywords are bad) and optimizes (i.e., avoids checking
keywords or allocating keyword-argument lists) first-order uses of
the procedure.

Checking and conversion are currently only performed for top-
and module-level bindings, because some macros detect the difference
between a variable or syntax definition --- notably `class' and
`unit'. A related problem in `class' is that the expansion
produces multiple definitions (for direct access to the fast
version of the function), which `class' turns into fields instead
of methods.
2011-08-09 16:33:15 -06:00
Robby Findler
1218cbfef6 improve send error message in the case that there is only one arg
closes PR 12091
2011-08-06 19:27:02 -05:00
Matthew Flatt
a2446dc019 fix `reverse' error message
Closes PR 12090
2011-08-05 10:03:37 -06:00
Eli Barzilay
63af93f1b4 Minor typo in macro, closes PR12084.
(Committed for Robby)
2011-08-02 16:56:02 -04:00
Matthew Flatt
c22c8b0846 remove incorrect comment 2011-07-31 06:28:12 -06:00
Matthew Flatt
920867287b fix for/list' to use the new reverse' 2011-07-31 04:43:24 -06:00
Matthew Flatt
b78a1a8355 remove abbreviations for for/sum' and for/product' 2011-07-27 07:55:20 +01:00
Matthew Flatt
9ace663021 Racket-implemented reverse', member', memv', memq'
With the JIT, the `reverse' function is significantly faster,
while the `member' variants do not really change; the main
benefit is that the operations play well with futures.

The C implementation is still used when the JIT is unavailable,
since the Racket implementations can be much slower in
interpreted mode.
2011-07-27 05:47:46 +01:00
Matthew Flatt
f1160da419 add for/sum', for/product', etc. 2011-07-27 05:47:46 +01:00
Robby Findler
b0ea1efc9e whoops^2 (both this and the previous commit: a refactoring put the wrong default argument in a function's parameter list) 2011-07-25 06:28:00 -04:00
Robby Findler
43a85acc8f oops 2011-07-25 00:08:18 -04:00
Robby Findler
7d06ae80f4 do a better job putting the right info into the struct id for provide/contract's struct clauses
closes PR 12053
2011-07-24 23:25:39 -04:00
Robby Findler
899b339a16 improved the expansion of struct/c 2011-07-24 23:24:20 -04:00