Commit Graph

39966 Commits

Author SHA1 Message Date
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
Matthew Flatt
cbd565a3fd fix interpreted begin0 to for a 0-result case
In some cases, 0 results will be represented by a NULL results-array
pointer. Fix the interpreter to detect a single result completion
through a count of 1 instead of a NULL result-array pointer.

Also, remove a bug extra push operation in the JIT-generated code for
`begin0`. (Other features of the JIT-generated code compensated for
the extra push in cases where the bytecode compiler did't optimize
away the `begin0`, so it turns out not to have caused a problem, but
that's a surprising and fragile set of coincidences.)

Closes #2571
2019-03-30 20:41:01 -06:00
Matthew Flatt
e7456d3e9e io: avoid some unneeded work when sending paths to rktio 2019-03-30 20:41:01 -06:00
Michael MacLeod
fdf13f9dfc Fix: make-complex -> make-rectangular 2019-03-29 20:26:39 -03:00
Matthew Flatt
dd9e11e1c7 cs: fix $value confusion in schemify and begin0
The attempted repair for `$value` in 6c195d521c was wrong.
2019-03-29 11:00:44 -06:00
Matthew Flatt
253f0f4383 cs: add guard for prop:arity-string
Relevant to #2569
2019-03-29 10:59:04 -06:00
Matthew Flatt
fdad73df32 cs: fix keyword-procedure chaperone with properties
Closes #2569
2019-03-29 10:46:29 -06:00
Matthew Flatt
793d655770 cs: limit linklet performance stats to main place
Avoids crashes due to a lack of synchronization, and makes
Racket CS consistent with Racket.
2019-03-29 10:21:15 -06:00
Matthew Flatt
6c195d521c cs: fix compilation of begin0 with only one expression
The problem was especially bad in the fallback interpreter,
where an ill-formed `begin` was created as a nested expression.
2019-03-29 10:06:26 -06:00
Paulo Matos
957b3d9aec Clarify in job names what's native and what's emulation 2019-03-29 08:56:47 +01:00
Robby Findler
7a9b1d065e Adjust ->i so that it sorts the pre/post conditions based on the dependency
order (like it does with the argument and result contracts), but ensuring
that the pre and post conditions come before the arguments (if possible)

closes #2560
2019-03-28 17:08:25 -05:00
Robby Findler
e1835074f5 refactor ->i implementation
so that it collects the pre/post conditions into sorted order with the
arguments (based on the dependencies), but then discards that
information and always evaluates the pre and post conditions after the
argument/result contract checks
2019-03-28 17:08:25 -05:00
Matthew Flatt
8aa357b517 repair test to reflect improved tanh precision 2019-03-28 07:41:14 -06:00