Commit Graph

944 Commits

Author SHA1 Message Date
Matthew Flatt
c195288251 scalable object locking
The `unlock-object` operation was O(N) with N currently locked objects
--- so, O(N^2) to lock N objects and then unlock them --- because
locked objects were stored in and searched in a global list. Also, GC
was O(N) at any generation with N locked objects across generations,
since every locked object was scanned.

Fix these poblems so that locking and unlocking is practically O(1)
and GC is not poportional to locked objects. More precisely, locking
and unlocking is now O(C) for locking an individual object C times to
be balanced by C unlocks. (Since multiple locks on a single object
is rare, this performance seems good enough.)

The implementation replaces the global list with segment-specific
lists. Backpointers are managed using the general generational
support, so that unmodified, old-generation locked objects do not
need to be swept duing a new-generation collection.

original commit: a57d256ca73a3d507792c471facb7e35afbe88b3
2019-09-01 07:03:16 -06:00
Bob Burger
fd172d93b3 use case-insensitive search for ".exe" in Windows
original commit: 20f86fea125ecf41b2246ad3ba9e9bb3f8a79c04
2019-08-22 10:10:06 -04:00
Bob Burger
9a9cf2a1e5 fixed tab character in makefiles
original commit: f1e91e76cd8e448aee26f3172cefae8ef14ea6e6
2019-08-15 10:19:58 -04:00
Andy Keep
0ccbd84870 Merge pull request #453 from juanfra684/fix-typos
Fix typos
original commit: bf018c856152bb8e58735286168545056fc62af6
2019-08-11 20:17:50 -04:00
Juan Francisco Cantero Hurtado
121be1049f Fix typos
original commit: 468adc892df9d4a0b4c8f282e11a608636a87049
2019-08-10 18:34:21 +02: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
Bob Burger
bf9541a370 fixed typo in LOG
original commit: e44cd987c5e4d95043602887cb1ef67ad619f813
2019-07-26 11:24:09 -04:00
Matthew Flatt
ce9df2f827 Merge github.com:cisco/ChezScheme
original commit: c5d71168eb4315f7e8ec9c0acf615fa0b9a2fc88
2019-07-26 04:29:00 -06:00
Alexander Shopov
3fec9b8bba Try to eliminate dead stores (#444)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
original commit: 84a6a6ab36294c73dbdc617d19c42fada42c3a15
2019-07-25 15:05:48 -04:00
Alexander Shopov
f3cc313d96 Add additional check to prevent going before start of buffer (#446)
p is a pointer that iterates over path, which is buffer.
We should not try to get to an address preceding its start.
Since there was an execution path that leads to that,
guard against it with an additional check.

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
original commit: de8d0e742f44c80735a682bd05019246c2087d56
2019-07-25 15:00:18 -04:00
5pyd3r
0df195f066 fix ee_read_char to handle ^@ properly
original commit: e962a03987470d0a3937446c10af3a94793ffc43
2019-07-25 14:48:38 -04: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
Bob Burger
6ab0111073 Merge branch 'bsd'
# Conflicts:
#	LOG

original commit: b6f861e6266f42f8cb0c4d2db9c3ebed5b98e35c
2019-07-25 14:35:27 -04:00
Alexander Shopov
8c891262a1 Use setenv rather than putenv on non WIN32 environments
Signed-off-by: Alexander Shopov <ash@kambanaria.org>

original commit: 8bf1e18853d5feeb64aadb631c35641cd0ab4748
2019-07-25 16:06:48 +02: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
463677304a configure with --libkernel as the default
original commit: f5f609214c3ee8eed083f05b508095df1aac40de
2019-07-05 07:30:51 -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
1de465c474 add --kernelobj configure option
Although `--kernelobj` is the default, allow it to be specified
explicitly, in case it makes sense eventually to change the default.

original commit: 46813ea67dd115d87924422373ea684b75e2772c
2019-07-04 13:28:53 -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
dcffbe1d8b Change make to $(MAKE) so it works more reliably on FreeBSD
and other platforms using non-GNU make systems.

original commit: 281a2b3ae12c13f15c14c2ba8968d40c28caacbf
2019-07-02 11:30:59 -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
Paulo Matos
a3f325bbea mark functions that never return as NORETURN
original commit: 6377313ecb063273b573139c9e91de263e191e60
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
7974eac7dc Merge github.com:cisco/ChezScheme
original commit: d9c77749cc1901a9f5fabb4d78055675f5333be3
2019-07-01 16:55:14 -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
dd0fe4ac40 unbreak MSVC build
Move `NORETURN` of 2e3a618b00 to start of function declaration, where
it works for both GCC and MSVC.

original commit: 10fc4a2406ecd34fa686d9d643ee63d7c12d6f97
2019-06-23 05:57:53 -06:00
Matthew Flatt
9f1fe73797 change build to use archives instead of merging objects
Merging ".o" files to one "kernel.o" can be convenient for further
linking, but it requires running `ld` directly. Running `ld` directly
sometimes runs into a mismatch between the C compiler and the default
`ld`. It's better to use the more typical approach of collecting
objects into an archive.

original commit: 7d5b60c7566570655e567495d86d546101cf8fb4
2019-06-21 18:53:33 -06:00
Matthew Flatt
a043c4b3a8 mark functions that never return as NORETURN
@pmatos did all the work here in racket/ChezScheme#8 and
racket/racket#2344.

original commit: 2e3a618b0072d547b6c5abe6dd8dbac36a98c10e
2019-06-21 14:26:01 -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
dyb
399e0fa924 adopted latest tspl hidx and idx files, which reflect a similar but
different fix for extra make-record-type-descriptor index entry

original commit: 6c4e0a5fd7c5d99690935ad04239406188977425
2019-06-13 15:17:08 -07: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
Paulo Matos
af63b73bad Update shift left that might cause ub
A few shift lefts cause ub because of `(1 << n)` where `n` is 31. 
The constant 1 is signed causing ub. Initially my fix was to do `(1U << n)` however, I have seen the pattern `((U32)1 << n)` elsewhere in the file so decided to follow this.

Caught by ubsan racketcs.
original commit: a902c9ab67010f521f786e2027d4e197d78975a4
2019-06-06 08:57:25 -06:00
Matthew Flatt
a0fea7f0a8 Merge pull request #6 from pmatos/patch-4
Make variables unsigned to avoid ub in calculation
original commit: 2c404b7232555b405027819fd1841cefe5322180
2019-06-06 08:56:48 -06:00