Commit Graph

306 Commits

Author SHA1 Message Date
Gustavo Massaccesi
6789fd84c1 Use system flag of primitives to avoid check in primvars.ms
With this flag the primitive is not tested in primvars.ms but other
parts of the compiler can use the signature/flags.

Also, add a signature to every system boolean primitive.

  primvars.ms, primdata.ss

original commit: ee023c673bda6557bc223de7f8b0e732600619bc
2019-11-15 17:03:00 -03:00
Matthew Flatt
8c82d4e5b7 fix continuation-attachment optimization and non-single-value primitives
original commit: 6180395ad38887c6278e96a6cea9e0a4aad2453a
2019-11-05 17:49:50 -07:00
Matthew Flatt
f0dc15c335 mark single-valued internal primitives
Probably makes no difference right now, since these internal functons
rarely show up in the process of optimizing user programs, but just in
case.

original commit: b54a288b31731368dbcf57c95b78f0a162c29147
2019-10-28 11:41:37 -06:00
Matthew Flatt
9ae0e9b971 fix call/cc inside call-...-continuation-attachment
Can't simply use a continuation reified by an attachment
operation, because it is probably a 1-shot continuation
that needs to be promoted.

original commit: 8201aff06df8011ffbc41f217d50e4c430d75bb5
2019-10-24 05:40:55 -06:00
Matthew Flatt
f52283de7e semi-inline call/cc in tail position
Effectively, change a `call/cc` call to `let/cc` when it appears in
the tail position of a function. This change takes advantage of
continuation-reification support that was built for continuation
attachments.

original commit: 4c015a5b55f7d04839a0efd8e5554fc237e4663b
2019-10-23 08:33:01 -06:00
Matthew Flatt
e53a4a8de2 disallow constant folding of mutable field access
original commit: 7ac8cd69fc709200c1c0064f8031855a950ea8d3
2019-10-16 08:52:12 -06:00
Matthew Flatt
4341bba898 don't try to constant-fold $record-ref
It's not safe, so atempting to fold is not safe.

original commit: 0178656e87155947426bca6edf4e26bab6626ae0
2019-10-13 18:07:27 -06:00
Matthew Flatt
b34084640b pseudo-random-generator-seed! should allow 0
original commit: 1802cca10ec6abfe4bc177a4d4d9fa0d9a201517
2019-10-07 20:08:41 -06:00
Matthew Flatt
18d18b7ff6 add pseudo-random generator API
The MRG32k3a generator is fast when using unboxed floating-point
arithemtic. Since the Scheme compiler doesn't yet support that,
build MRG32k3a into the kernel and provide access via
`pseudo-random-generator` functions.

original commit: 3dd74679a6c2705440488d8c07c47852eb50a94b
2019-10-07 10:58:39 -06:00
Matthew Flatt
174c416f9e repair for opportunistic 1-shot
If normal 1-shot continuations are mixed with opportunistic 1-shot
continuations created by `call-setting-continuation-attachment`, then
promoting an opportunistic 1-shot at a GC is wrong unless the whole
chain is promoted.

original commit: 2dfac475666763b60935e382386af4438f3029e0
2019-09-24 11:41:50 -06:00
Matthew Flatt
c2e78cd676 skip unnecessary check for reified frame
Since we've effectively inlined the check, make the
`reify-cc` intrinsic always just reify.

original commit: 747a8a0165c62f63cd6560dbaa9cc8b09fc9ec50
2019-09-19 12:12:34 -06:00
Matthew Flatt
4e3b829227 add $app
Using `#3%$app` disables a `procedure?` check in an application.

original commit: d7960da9e3c3a864a4df42cb8bb71d9b205aeb95
2019-09-19 07:30:42 -06:00
Matthew Flatt
ee7efa1dc3 unbreak 64-bit Windows build
Fix typo in d8cb953259.

original commit: ebfa3460fd58c47df8eaf70d67db119147364bc2
2019-09-13 10:22:15 -06:00
Matthew Flatt
77ea4ccb78 add scheme-fork-version-number
Include an extra part in the Chez Scheme version number, which both
helps indicates the Racket fork and versions it.

original commit: 00678e29bb9f05de2ccaec8585126e967cdcc6f4
2019-09-13 07:09:13 -06:00
Matthew Flatt
f1a839069d fix __collect_safe and arguments/results in x86_64 floating-point registers
original commit: d8cb953259faeb8cbab8f66c365ac87eb37ad0f6
2019-09-13 06:09:47 -06:00
Matthew Flatt
c57de26c1d add call-consuming-continuation-attachment
Also, rename `call-with-current-continuation-attachment` to
`call-getting-continuation-attachment`.

original commit: e2a00e6d641b92918c4911c27ba14949748fd291
2019-09-11 17:07:11 -06:00
Matthew Flatt
b842a134fd continuation-attachment performance
Add a shortcut check when refiying the continuation frame in tail
position, which is significantly cheaper when the frame is already
there. We pay down the check by skipping an attachment-lists check
that is not needed if the frame is newly reified.

Aslo, add a one-shot continuation-frame cache, which makes a shallow
temporary attachment cheaper, as in

 (let loop ([i N])
   (if (zero? i)
       0
       (loop (call-setting-continuation-attachment
              i
              (lambda ()
                (f (sub1 i)))))))

The cache is just one frame. Keeping a chain of allocated-by-not-GCed
frames doesn't pay off.

Meanwhile, remove the leftover `$shift-attachment` library entry.

original commit: 1f454f536b1d7efe20fe9e793cda31e54e31e5f4
2019-09-11 09:34:42 -06:00
Jon Zeppieri
625c466ee7 Adds hashtable-ref-cell
... and eq-hashtable-cell and symbol-hashtable-ref-cell,
which are just like hashtable-cell, except that if the given
key isn't present, they return #f instead of mutating the table.

original commit: c1ab89fc2152ba41f50c0a5b0e5857fc48fc63c1
2019-07-26 16:02:55 -06:00
Matthew Flatt
ce9df2f827 Merge github.com:cisco/ChezScheme
original commit: c5d71168eb4315f7e8ec9c0acf615fa0b9a2fc88
2019-07-26 04:29:00 -06:00
tokomikea
2647c0df24 export ee-backward-delete-sexp binding in the expression-editor module. (#439)
original commit: a851ea3299044c58f559e700004c590dfed462e9
2019-07-25 14:41:55 -04:00
Matthew Flatt
ed8794d83d fix check for arity wrapper and non-fixnum-width arg count
Closes racket/racket#2746

original commit: 633cab4d38d8d22a0425f5554d80faba925dfdde
2019-07-17 16:43:32 -06:00
Matthew Flatt
368d079d24 adjust build for BSDs, MinGW cross-compile, and more configuration
Includes joint work with @abmclin, @pmatos, and @jessealama.

original commit: 2649600c68ff57efb63d6d5d10c9d9f73368f59a
2019-07-06 13:16:57 -06:00
Matthew Flatt
71846161f9 Merge branch 'bsd' of github.com:mflatt/ChezScheme
original commit: 198477a40c2c580924d95491e63d80e1f9a39c0d
2019-07-05 07:30:37 -06:00
Matthew Flatt
c38194c0ca adjust build for BSDs, MinGW cross-compile, and more configuration
Includes joint work with @abmclin, @pmatos, and @jessealama.

original commit: 70559d074f70dcadec5cea3619f75f91fcda77eb
2019-07-03 18:54:04 -06:00
Alexander B. McLin
6a56c06b1d change update-revision to use #!/bin/sh
Previously it was using #!/bin/bash as its interpreter. It is not
compatible with FreeBSD because bash is not installed by default.

The update-revision script is #!/bin/sh compatible and there are
other examples of #!/bin/sh scripts in the codebase so the change
is consistent with them.

original commit: 0ad188cdbd618b369e7fe6d2b9446251fe92e891
2019-07-02 11:30:59 -06:00
Matthew Flatt
91ba34b886 fix open-string-input-port on immutable strings
original commit: 58663d92a353969e3b27de2e1a44df571036e1b2
2019-07-02 13:17:39 -04:00
Matthew Flatt
98381f0206 Merge branch 'strport' of github.com:mflatt/ChezScheme
original commit: 4ae71d2bac241154aad565a6006454fb394fc9fb
2019-07-01 16:56:05 -06:00
Matthew Flatt
5053fbb98d fix open-string-input-port on immutable strings
original commit: 48b0ace8b6fba756d8573698db4244472c64255f
2019-07-01 16:44:45 -06:00
Matthew Flatt
5f92ffa3c4 improve asin acos on +inf.0 and -inf.0
Avoid tripping into +nan.0 by using 0 instead of 0.0
for the imaginary part of a real number and by using
`atan` with two arguments instead of one.

original commit: e3f499adfbcbe94726fe11869ca23176fa2c3b78
2019-06-28 15:58:17 -06:00
Matthew Flatt
d31368fc09 improve expt on exact non-integer second argument
Correct the case that converting the second argument to an inexact
numbe produces an integer by losing precision.

original commit: 467db7fa1f1d068e9bad250b93044d157cd3806d
2019-06-28 14:33:18 -06:00
Matthew Flatt
35a0dfcafe improve precision of complex-number divide
original commit: 4c9a7f6abb1258158d48fcdb656de300902cf3c7
2019-06-28 10:42:57 -06:00
Matthew Flatt
57c997042e repair for make-object-finder with threads
The `(cdr tc-ptr-offsets)` in the recrusrion was wrong, but use
`thread->objects` and `thread->stack-objects` to work more generally.

original commit: fd620699dc620d3d1a522800a7dfaff6cc0393bb
2019-06-26 12:32:02 -06:00
Matthew Flatt
1116287328 adjust sqrt and log on -0.0
original commit: 098fdb7d197bda4cd1ecc9b68407ee72fcce9311
2019-06-21 12:48:42 -06:00
Matthew Flatt
e11d9c846e fix flround on [-0.5, 0.0)
original commit: 9679b21d99477a077b226bc279a6d68ebbd7ce5b
2019-06-21 12:26:00 -06:00
Matthew Flatt
8479c4bebf print positive flonum exponents with "+"
original commit: bcf4dd26d268e25a89f24edc4ae7c75c97411c6d
2019-06-21 12:19:59 -06:00
Gustavo Massaccesi
d56e01edc9 rename who -> maybe-who
original commit: d03334caa7cfe429b5ea0d4ed245524fcf787cab
2019-06-20 12:33:51 -03:00
Gustavo Massaccesi
9c36f8dc3d make true flag automatic
original commit: a88ae6cec82e428a37827b12c0886dfc76569067
2019-06-20 12:33:51 -03:00
Gustavo Massaccesi
2a20927ac2 use more specific signatures to imply true
original commit: 7d1ad70840d85912ff08cb2d3ec0c685fc134661
2019-06-20 12:33:50 -03:00
Gustavo Massaccesi
85ef2ef788 use signatures with eof/something
original commit: 9785012847db7e6bae35ce9cef83559ca8ae7632
2019-06-18 17:49:18 -03:00
Gustavo Massaccesi
109cece609 fix signatures with errors
original commit: c9296345301d84c2708f0f45e1884bef7070e393
2019-06-18 17:49:18 -03:00
Matthew Flatt
034927b44f add eq-hashtable-try-atomic-cell
original commit: 8af6533643eaaa1b22f5724c52b6b26f4a81d7c4
2019-06-16 10:35:31 -06:00
Matthew Flatt
e8bd9b83cd repair {Free,Open,Net}BSD build
Use OSSP UUID on {Free,Open}BSD and native UUID on NetBSD.

Building on OpenBSD requires a filesystem mounted with wxneeded.

original commit: e964d7d01a6d115e469c01626896b683d421d599
2019-06-11 09:34:09 -06:00
Matthew Flatt
6a8b48bd72 repair some safeongoodargs in "primdata.ss"
@gus-massa's adjustments to the Racket test suite exposed more places
where the "primdata.ss" spec was wrong.

original commit: 5cb4996c7b317307299e8dd55a25e8e58144a30e
2019-06-10 10:26:55 -06:00
Gustavo Massaccesi
2089562e73 fix flag in signature of inexact->exact
It fails when the argument is +inf.0, so it's not possible to make it unsafe
automatically when the argument is a number.

original commit: 4d31d65b0e685adca7c01973cf7f30e716356a6b
2019-06-07 23:44:06 -03:00
Matthew Flatt
81191397b5 Merge github.com:cisco/ChezScheme
original commit: bb65f1a8e429683e2925cf1678145efe0ade59bb
2019-06-07 08:56:14 -06:00
Gustavo Massaccesi
3c53b8b940 small fix in relop-length to enable the optimization
original commit: 587e0f4c01bf6bc187fc4e829fba9cc8ca7c38dd
2019-05-23 14:34:54 -04:00
Matthew Flatt
2cf27c4727 Merge github.com:cisco/ChezScheme
original commit: 8118200e237d756f83be54e8bf3eabb4af2388ed
2019-05-22 10:46:59 -06:00
gus-massa
58ee63722a Fix signatures of $file-options and friends (#429)
They were defined inside a block with the `proc` flag, but they are `enum-set`s.
  primdata.ss
original commit: 3fce8333e3856573292b97b9a2d47827216f9097
2019-05-22 10:52:24 -04:00
Matthew Flatt
0de9e0808b suppress "|" precision indicator when printing flonums
I'm not sure why precision is shown when `print-precision` is set to
0.5e-323.

original commit: 1976cd57b6981c3c5a559943763190855ca6ab21
2019-05-18 10:21:45 -04:00
Gustavo Massaccesi
25cfadaeec fix check of size of make-phantom-bytevector in 32 bits
original commit: d44ab30993fdf085566ecd71b0f7db9a50eb0cc5
2019-04-25 12:46:15 -03:00