Commit Graph

39039 Commits

Author SHA1 Message Date
Gustavo Massaccesi
6d775e5c5c optimizer: reduce (length '()) ==> 0
This pattern is common in the internal code of the keyword procedures
2018-06-20 17:34:21 -03:00
Matthew Flatt
598a5baf6a JIT: fix miscompilaton of char=?, char<?
When the first subexpression is complex and the second
is a literal character, the generated JIT code swaps the
argument order, but compilation didn't swap the test for
whether one or the other is a literal character to skip
a run-time test.
2018-06-20 13:43:19 -06:00
Matthew Flatt
da41bdf43a syntax/modread: adjust error-message quotes
While we're adjusting error messagaes, change `...' to `...`.
2018-06-19 20:12:01 -06:00
Stephen Chang
8620bc50be clean up check-module-form
- truly ignore expected-module (in err msgs) to match docs
- remove dead code
2018-06-19 20:10:16 -06:00
Paulo Matos
d6fe30156c Fix indentation
Remove tab and add spaces, which is how the rest of the file deals with this.
Avoid a misaligned preview in github editor.
2018-06-19 20:05:35 -06:00
Matthew Flatt
0b71883833 reference: further corrections to the surrogate docs 2018-06-19 20:01:59 -06:00
Leif Andersen
b7cb35fd66 Update technical bugs in the surrogate docs.
It claimed two extra methods were generated when no
(#:use-wrapper-proc) was provided: (set/get)-surrogate-wrapper-proc.

Removes that claim from the docs.

Also fix a few minor stray punctuation marks.
2018-06-19 19:43:44 -06:00
Winston Weinert
99a627b195 Add key phrase "best practices" to style guide
I tried Googling for Racket best practices, and could not easily find
the style guide. Adding these key words to the text should improve
discovery of the style guide when one forgets the key word "style" :)
2018-06-19 19:34:35 -06:00
Gustavo Massaccesi
17acb7458b avoid compiler warning in jit 2018-06-19 19:27:35 -06:00
Matthew Flatt
a9601e3fe7 adjust some filesystem tests to work as root
Closes #2137
2018-06-19 18:01:41 -06:00
Matthew Flatt
ea31e6c810 docs: typo repairs in the linklets chapter 2018-06-19 16:04:27 -06:00
Matthew Flatt
b9401a7a2a docs: fix "linklet directory" that should be "linklet bundle"
Closes #2138
2018-06-19 16:04:27 -06:00
Matthew Flatt
931db97fc0 docs: correct and improve docs for instance-set-variable-value!
Closes #2139
2018-06-19 16:04:27 -06:00
Matthew Flatt
d72ccb521d MzCom: repairs for some Windows configurations
Registration of the typelib seems to be required on some modern
configurations, and myssink must claim to not implement
INoMarshal.
2018-06-19 13:29:19 -06:00
Sam Tobin-Hochstadt
ff867155d1
Add Sarah and Andrew. 2018-06-19 11:25:55 -04:00
AlexKnauth
f95fcb64c0 syntax:read-xml: test that src argument becomes the syntax-source 2018-06-18 19:52:52 -04:00
AlexKnauth
7ec97942c0 add documentation for src argument to syntax:read-xml 2018-06-18 19:52:52 -04:00
AlexKnauth
3996f23879 add src argument to syntax:read-xml
and pass it through into the syntax-source field of the result
2018-06-18 19:52:52 -04:00
Matthew Flatt
0cd640811b reference: use racket/private/kw-syntax-local as binding source
Using `racket/private/kw-syntax-local` as the source for
`local-expand`, etc., means that modules that re-export that
one (such as `scheme/base`) get the right documentation links.
2018-06-18 08:37:51 -06:00
Gustavo Massaccesi
9cd3798ca9 schemify: add reduction of (not #f) 2018-06-16 22:44:39 -03:00
Matthew Flatt
96161f68eb fix non-initial call to scheme_basic_env
When an embedding application calls `scheme_basic_env` a
second time, it's supposed to reset the main namespace, but
the new expander wasn't reset correctly.
2018-06-16 15:49:38 -06:00
Matthew Butterick
d2a69d6384
doc typos 2018-06-16 13:39:32 -07:00
Matthew Flatt
3c752e008e Racket HISTORY note for v7.0 2018-06-16 09:59:38 -06:00
Matthew Flatt
d3067465e3 setup/unixstyle-install: use delete-directory/files
Use `delete-directory/files` instead of a separate implementation
here to get the special deletion mode for Windows files.
2018-06-16 09:59:38 -06:00
Philip McGrath
5a4ea2cd1b json: small fixes
* Fix handling of single-percision infinities and nan

* Document that non-`hash-eq?` hash tables are accepted by `jsexpr?`.

* Document that the value of `json-null` is recognized using `eq?`

* Use `case` instead of `assoc`.

* Use contracts
2018-06-16 00:42:43 -04:00
Sam Tobin-Hochstadt
3b13cb899a "Fix" the packers.rkt test.
It appears that sometimes file timestamps can be off by 2, in
addition to the granularity-of-2-seconds issue.
2018-06-15 21:12:34 -04:00
Matthew Flatt
047157dc30 reference: doc repairs
Doc corrections related to functions that have new optional arguments
in v7.0.

Closes #2134
2018-06-15 17:19:42 -06:00
Alexis King
41fd4f3a5e Allow local-expand to opt-out of implicit extension of the stop list
Also, adjust the expansion of #%plain-module-begin to reinstate the stop
list after initial partial expansion.
2018-06-15 17:56:52 -05:00
Matthew Flatt
88e5daf65c add MemoryModule copyright to license page
Include the MemoryModulee copyright alongside the ones for other libraries
that are compiled into the Racket executable.
2018-06-15 16:43:30 -06:00
Oling Cat
331c39cfe9 The HtDP/2e is about Racket now. 2018-06-15 16:21:01 -06:00
Matthew Flatt
98ae91e0ba expander: repair and further improve flattener
Delay reporting of potential problems until an actual problem
is detected. Correct a mismatch between original and renamed
symbols to restore detection of problems.
2018-06-14 17:27:00 -06:00
Sam Tobin-Hochstadt
62ef3ed1ee Improve flattener. 2018-06-14 14:04:05 -06:00
Matthew Flatt
daa7ddeef8 workarounds for Windows filesystem behavior
* When you delete a file in Windows, then the name doesn't go away
  until the file is closed in all processes (and background tasks like
  search indexing may open files behind your back). Worse, attempting
  to create a new file with the same name reports a permission error,
  not a file-exists error; there's seems to be no way to tell whether
  a permission error was really a file-exists error.

  This creates trouble for `make-temporary-file` when files are
  created, deleted, and created again quickly enough and when
  something like a search indexer runs in the background (which is the
  usual Windows configuration). In practice, that kind of collision
  happens often for `raco setup` on my machine.

  To compensate, make `make-temporary-file` try up to 32 times on a
  permission error. A collision that many times seems extremely
  unlikely, and it seems ok to delay an actual permission error.

  Windows provides a GetTempFileName function from "kernel.dll" that
  must be able to deal with this somehow --- perhaps because it's in
  the kernel --- but it doesn't solve the problem for making temporary
  directories, hence the 32-tries approach for now.

* When a deleted file's name persists because the file is open in some
  process, then a directory containing the file cannot be deleted.

  This creates trouble for `delete-directory/files`, since
  `delete-file` on a directory's content doesn't necessarily make the
  directory empty. In practice, this happens often for package
  upgrades on my machine, where the package system wants to delete a
  short-lived working space that the indexer is trying to scan.

  To compenstate, change `delete-directory/files` to delete a file by
  first moving it to the temporary directory with a fresh name, and
  then delete the file there. It may take a while for a file to
  disappear from the temporary directory, but meanwhile it's not in
  the way of the original enclosing directory.

* When a file is open by any process, it prevents renaming any
  ancestor directory of the file.

  This creates trouble for the package system, which installs a
  package by unpacking it in a temporary place and then moving it by
  renaming. The package system also removes a package by renaming it
  to a subdirectory of a ".trash" directory. If a background indexer
  has a package file open, the move fails. In practice, a move fails
  often on my machine when I'm attempting to upgrade many packages.

  To compensate, make the package system fall back to copy + delete
  if moving fails with a permission error.
2018-06-13 18:57:07 -06:00
Matthew Flatt
09cdbc418c expander: allow rename transformer to primitive in local-expanded
Closes #2119
2018-06-12 19:19:09 -06:00
Matthew Flatt
c7318cab33 expander: fix syntax-local-bind-syntaxes for local-expand
Bind variables in a way that allows `local-expand` (with an empty stop
list) to replace a reference to the binding with one that has the same
scopes as the binding.
2018-06-12 16:23:44 -06:00
Matthew Flatt
380dc42427 expander: fix interaction of expand+eval across namespaces
This repair was motivated by tests in the "rex" package. The
new test added here failed before by finding 'new both times,
but in the "rex" case, the mixup led to the same variable
being imported and exported at the linklet level.
2018-06-12 12:58:56 -06:00
Ben Greenman
cf0c06d810 struct-out: get correct list of super-struct mutators
struct-out was putting the super-struct's accessors into two parts of a
struct-info: the accessor list and the mutator list

this commit puts the accessors only in the accessor list and the
mutators in the mutator list
2018-06-12 08:49:58 -06:00
Matthew Flatt
5c641919a6 fix --enable-jitframe for platforms that use libunwind 2018-06-11 18:16:17 -06:00
Matthew Flatt
0d870fb11c reader: fix bugs in cdot readering 2018-06-11 16:24:34 -06:00
Matthew Flatt
f11b4319b5 catch up on some acknowledgments 2018-06-11 11:42:18 -06:00
Matthew Flatt
a703b608a4 add --enable-jitframe for configure on x86_64
Using a frame pointer for the ABI of internal helper functions
should make the stack friendlier to tools like `perf`. There
may be a small performance cost, though.
2018-06-11 08:35:42 -06:00
Matthew Flatt
2c58937008 expander: fix comment 2018-06-08 09:24:13 +08:00
Vincent St-Amour
a2ab778ddb Post-release version for the v7.0 release 2018-06-07 09:10:05 -05:00
Robby Findler
aabd0e4603 fix random contract generation for </c and >/c when they get +inf.0 or -inf.0 2018-06-07 08:49:02 -05:00
Sam Tobin-Hochstadt
c6dd371ed6 Make stx.rkt cross-phase persistent.
This eliminates more than 70 linklet instance creations.
2018-06-07 09:38:38 -04:00
Matthew Butterick
ce97087507
missing paren 2018-06-06 14:44:40 -07:00
Sam Tobin-Hochstadt
2255d5be78 This require only needs racket/base. 2018-06-06 15:29:58 -04:00
nocheroot
fdc033474a Fix typos in test.rkt 2018-06-06 08:46:28 -03:00
Alexander McLin
5d1371cb73 Added clarifying notes emphasizing that dynamic-require is a procedure so
giving plain s-exps like you would for `require` is unlikely to work as expected.
Need use something that evaluates to the appropriate s-exp you want.

Added more examples of different `dynamic-require` uses.
2018-06-05 16:40:01 -04:00
Matthew Flatt
4e10ed0518 expander: fix another local-expand problem with 'module-begin
Alexis's repair, and as she notes, forcing a `post-expansion` context
value in the core `#%module-begin` expander may allow a simplification
in "definition-context.rkt". But it's not immediately obvious, so save
that potential improvement for later.

Relevant to #2118
2018-06-03 17:10:31 +08:00