Commit Graph

39978 Commits

Author SHA1 Message Date
Alexis King
72ab50a993 Establish free-id=? equivalences in intdefs with local bindings in scope
fixes #2594
2019-04-22 22:50:16 -05:00
Alexis King
38d612dba6 local-require: Remove last remaining use of syntax-local-get-shadower 2019-04-22 22:49:14 -05:00
Matthew Flatt
701a86b863 source "README.txt" corrections related to Racket CS builds 2019-04-22 19:06:24 -06:00
Matthew Flatt
25be788d61 makefile: support client builds with machine-independent bytecode 2019-04-22 18:41:07 -06:00
Matthew Flatt
e001f3b3cb include ChezScheme sources in a source distribution
Note that the source-distribution client must have a
"build/ChezScheme" checkout created, maybe by building as a 'cs
variant. A pruned version of that checkout is then included with other
sources. The resulting source distributon then works for building
either Racket variant.

Adapt the configure scripts and makefiles to use a "ChezScheme"
directory that is bundled with sources.
2019-04-22 16:56:17 -06:00
Matthew Flatt
21ad81b4fc cs bootstrap: move struct declaration to centralized module
Keep together declarations that need to match the Chez Scheme
implementation.
2019-04-22 07:24:38 -06:00
Gustavo Massaccesi
55dcdf5538 fix jit-inlining of struct primitives
Some expressions like (date-day) gave usually an arity error, but when they
were inlined by the JIT the arity check was wrong, so they produce a segfault
or a nonsensical result.
2019-04-20 20:09:57 -03:00
Matthew Flatt
4b586eeadf cs: faster Chez Scheme bootstrap
Improve record encoding to make it more exposed to the compiler.
2019-04-20 13:27:02 -06:00
Matthew Flatt
8c8979369f cs: switch Chez Scheme download to racket/ChezScheme at GitHub 2019-04-20 08:32:36 -06:00
Matthew Flatt
e2de99f0b9 cs: adjust build to use Racket bootstrap of Chez Scheme 2019-04-20 08:25:20 -06:00
Ben Greenman
f26b793e9a recursive contract: add else-branch to a cond
Raise an exception if none of the other cases match, instead of
returning `(void)` where a contract is expected
2019-04-19 20:43:44 -05:00
Matthew Flatt
e337c65204 implement bootstrap of Chez Scheme using Racket
Provide a way to build Chez Scheme from source using Racket. In the
short run, this lets us distribute source that ultimately depends only
on a C compiler (since a variant of Racket can be built from source
using just a C compiler).
2019-04-19 13:45:50 -06:00
Matthew Flatt
7e9d167101 expander: fix namespace-require/copy for some require specs 2019-04-19 13:44:14 -06:00
Robby Findler
c800b61f0b test cases for bad vector contract error messages 2019-04-18 20:07:36 -05:00
Ben Greenman
6d7550125f typo: change error messages for vectorof contract
- change an 'an' to 'a'
- remove 'immutable' where expecting either mutable or immutable (don't
  bother to specify which, because `vector-common.rkt` doesn't bother)
- remove extra ','
2019-04-18 07:15:08 -05:00
Matthew Flatt
e1ad8d4721 cs: fix path on discovered Chez Scheme library name
Corrects 8a368cac99.
2019-04-12 06:56:07 -06:00
Matthew Flatt
615677299e switch Mac OS back from poll to select
The `poll` system call doesn't work right for fifos, so switch
back to `select`, but use a new strategy to size fd_set buffers
instead of trying to use `getdtablesize` (because the result
of `getdtablesize` can change dynamically on Mac OS).

Also, add a check for input at the rktio level when trying to read
from devices other than regular files. Otherwise, Racket CS (which
doesn't have some redundant polling that is in traditional Racket)
sees spurious EOFs for unconnected fifos.

Closes #2577
2019-04-10 12:34:40 -06:00
Matthew Flatt
4c53b514cf cs: correction on compiler flags for object-name
Repairs a mistake in 40b8b5c675.
2019-04-10 07:55:24 -06:00
Matthew Flatt
8a368cac99 cs: fix discovery of Chez lib name on Windows 2019-04-10 07:52:11 -06:00
Paulo Matos
822429f4e5 Increase core tests timeout to 1hr
The tests might take longer when racket is compiled with -O0 and ubsan
causing timeouts and job failures which are not necessarily related to
problems in Racket.
2019-04-10 15:22:28 +02:00
Paulo Matos
c36e3db435 Change racket and raco exe name depending on target 2019-04-10 14:24:14 +02:00
Paulo Matos
9e8b9d8959
Remove value store in ready_pos but unread (#2588)
* Remove value store in ready_pos but unread

* Move declaration of ready_pos to where it is used

* Make discard of return value of tcp_check_accept explicit

* Split declaration and var assignment to comply with xform
2019-04-10 14:14:57 +02:00
Paulo Matos
8403ce4109 Emulation jobs should only run on schedule
At the moment we don't have enough resources to constantly run the
emulation jobs which are cpu intensive and long, therefore it is
better to run them on a nightly schedule instead.
2019-04-10 09:37:51 +02:00
Paulo Matos
a3b90d0aab Allow failure for currently failing gitlab jobs 2019-04-10 09:23:59 +02:00
Paulo Matos
5a3d7b87e4
Remove dead assignment to ch (#2589)
Remove dead assignment to ch and make discard return value explicit
2019-04-10 08:37:37 +02:00
Paulo Matos
2919d21d1d
Remove dead assignment to target_offset (#2590) 2019-04-10 08:34:06 +02:00
Paulo Matos
93224561f8
Fix --enable-cify option (#2598)
I guess, a previous copy-paste AC_ARG_ENABLE meant that cify never had
its own option.
2019-04-10 08:32:52 +02:00
Matthew Flatt
40b8b5c675 expander extract: improve pure-function analysis
Improve the analysis enough to handle changes to
`make-keyword-procedure` (in 47467a1dba) and restore the Racket CS
build.
2019-04-09 16:12:31 -06:00
Gustavo Massaccesi
9f9b3f4443 cs: fix check of Chez Scheme version
Merge to v7.3
2019-04-09 18:03:57 -03:00
Matthew Flatt
ef49ccf87a cs: fix chaperone-struct on accessor/mutator taking a position
Closes #2570
2019-04-09 11:53:27 -06:00
Matthew Flatt
247c985702 cs: faster (current-memory-use 'cumulative)
A slow `(current-memory-use 'cumulative)` could causes misleading
results in `PLT_EXPANDER_TIMES` output for frequent actions.
2019-04-09 11:53:27 -06:00
Matthew Flatt
d61f56c77f cs: imprve fixnum hashing
Avoid collision for 0 and -1, for example.
2019-04-09 11:53:27 -06:00
Matthew Flatt
cc45dc044d cs: faster number->string on fixnums 2019-04-09 11:53:27 -06:00
Alexis King
1bf416a776 Make equal? on classes and objects see through class contracts
Making `equal?` do the right thing on classes turned out to be easy---it
just involved adding a straightforward `prop:equal+hash` property to the
`class` struct—but making it work properly for *objects* was the tricky
part. The trouble is that `equal?` on objects that don’t implement the
`equal<%>` interface is just ordinary structure equality, which can be
relevant if objects are inspectable. Writing `(inspect #f)` in a class
body is like making a struct `#:transparent`, and it has all the same
ramifications for equality.

The trouble is that `class/c` creates new wrapper classes, and every
class has its own struct type. Since the default behavior of `equal?` on
structs is to *never* be equal to structs of different types, even
subtypes, an object created from a contracted class can never be
`equal?` to an object created from the same class without contracts.

The solution is to add a `prop:equal+hash` property to `object%` itself
that emulates the default behavior of `equal?`, but sees through class
contract wrappers. Since struct type properties are inherited by
subtypes, this property will be present on all objects, and it only
needs to be attached once.

fixes #2279
2019-04-09 12:27:27 -05:00
Alexis King
47467a1dba Avoid creating procedures with internal source locations as names
Mainly, this improves `make-keyword-procedure`: when applied to a single
argument, it now uses `procedure-rename` to ensure the resulting
procedure has the appropriate name. A couple other changes also guard
against the case where a lambda expression has no inferred name and no
source locations information, which would lead to the source locations
in the implementation being used, instead.
2019-04-09 12:27:11 -05:00
Matthew Flatt
0d2dd8f578 cify: fix multiple-value return where braces are needed
Merge to v7.3
2019-04-08 13:15:19 -06:00
John Clements
5ce11626ef Post-release version for the v7.3 release 2019-04-08 10:55:30 -07:00
Paulo Matos
b9b6d97b30
Make second argument of scheme_os_getcwd a size_t (#2584)
By being an unsigned type, we ensure that when 0 is passed we know
that there's no smaller number. This aids the static analyzer.
2019-04-08 17:25:43 +02:00
Matthew Flatt
e6aef1093b expander: fix submodule order nondeterminism
The nondeterminstic order could lead to a mismatch that caused
Racket CS to crash on submodule tests.
2019-04-08 07:23:47 -06:00
Vladilen Kozin
8dfc690eba Update syntax-model.scrbl (#2596)
Fix what looks to me as incorrect explanation of how identifier bindings are resolved. Could've used an alternative wording, but it'd make for a bigger diff:

> An identifier refers to a particular binding when the reference’s symbol and the identifier’s symbol are the same, and when the binding’s scope set is a subset of the reference’s scope set.

Was discovered in [this discussion](https://groups.google.com/d/msg/racket-users/9nVJxSVSdng/Yg28Bc8QBgAJ)
2019-04-08 07:13:09 -06:00
Matthew Flatt
d87be8789e cs: use new $record-ref, etc., primitive
Also, speed up hashing and logging a little by adjusting semaphores to
succeed with `$record-cas!` when no waiting is necessary.
2019-04-08 11:13:01 +02:00
Matthew Flatt
39c67f8b6a cs: require Chez Scheme 9.5.3 2019-04-07 10:32:55 +02:00
Matthew Flatt
5a638073eb cs: avoid abuse of vector-ref for struct-ref
Use `$object-ref`, instead. Otherwise, cptypes can detect the abuse of
`#3%vector-ref` and make unwanted transformations.
2019-04-07 10:24:54 +02:00
Matthew Flatt
d8125082a2 cs: improve hash-code mixing 2019-04-07 10:24:54 +02:00
Matthias Felleisen
9faa315a7e
closes all/15598 from gnats
Thanks, btmeehan@gmail.com
2019-04-05 20:37:00 -04:00
Alexis King
b6db4f7be1 class/c: Fix init arg contract projections being dropped
Previously, all init arg contracts’ first order checks were always
checked, but a typo meant all but one of the projections was always
dropped! This fixes that, and it removes a little nearby dead code while
we’re at it.
2019-04-04 15:27:14 -05:00
Paulo Matos
1795bcb924 Move -DMZ_DECLARE_NORETURN to CPPFLAGS
With this change, the generation of C files in xform will carry the
declaration as well. This means that we will have less false positives
on the files.
2019-04-03 18:35:30 +02:00
AlexKnauth
935c558717 fix uses of raise-arguments-error
one message string and no field-value pairs
2019-04-02 11:10:16 -04:00
Paulo Matos
9f80bc9cee Fix i386 CS testing job name
native -> emulation
2019-04-02 09:31:50 +02:00
Paulo Matos
35d269c29e Implement cross-architectural and native testing on Gitlab
This change implements, on gitlab.com/racket/racket CI pipelines,
cross architectural and native testing using virtualized hardware
using user mode qemu.

It also fixes use of caches/artifacts to deal with passing of the qemu
build and llvm build through stages.

Testing added for Racket:
Native: armv7l (running on rpi3), x86_64
Emulated: arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el,
s390x

Testing added for Racket CS:
Native: x86_64
Emulation: i386
2019-04-02 09:17:42 +02:00