-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update after recent rust-nightly changes. #19
Update after recent rust-nightly changes. #19
Conversation
Good idea. This stuff is moving quite fast and breakages tend to happen a lot in the alloc API. bors r+ |
19: Update after recent rust-nightly changes. r=jacob-hughes a=ltratt There are two PRs which affect us: rust-lang/rust#74850 rust-lang/rust#75152 Henceforth, we should probably be keeping a close eye on and contributing to: https://github.com/rust-lang/wg-allocators/issues Co-authored-by: Laurence Tratt <[email protected]>
Build failed: |
Sausages. We've been hoist by rustfmt's petard: the last version of rustc with a working rustfmt predates this change :/ Any thoughts? |
Thinking about this, I think that we have to wait to merge this PR, because we have dependent repos that expect a working rustfmt. What that means is that, when building locally, one needs to use a specific version of rust (2020-07-27 to be specific) until rustfmt builds again and we can merge this. What a mess! |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild succeeded: |
OK for me to squash? |
175: Split `Frame::new` into two. r=ptersilie a=ltratt This function is one of the most frequently called in yksom, so the fact that it serves two different masters (methods and blocks) is less than ideal (at the very least it introduces a branch). This commit splits the function into two, one for methods and one for blocks. To some extent this is a bit pointless in that the major overhead of `Frame::new` is the malloc of a `Vec`, but one day that cost will be much less, so this change seems like a useful one, if perhaps a bit early! This can be reviewed but won't be mergeable until softdevteam/libgc#19 is merged. 176: Lazily store the number of Unicode characters a string contains. r=ptersilie a=ltratt Calculating the number of Unicode characters in a string is an O(n) operation. Previously everytime `String_::length` was called we iterated over the underlying string to discover how many Unicode characters it contains. This commit adds a field to SOM strings that stores its number of Unicode characters. Since not all strings will be queried for this property, we lazily cache this property the first time that `length` is called on a `String_`. We use `usize::max` as our marker as that means the marker is "safe" in all cases. On the JSON benchmark, with GC off, this speeds things up by about 80%. Needs softdevteam/libgc#19 to be merged first. Co-authored-by: Laurence Tratt <[email protected]>
177: Remove calls to tobj() when we know we must have a GCBOX. r=ptersilie a=ltratt Needs softdevteam/libgc#19 to be merged first. At the moment a `Val` can only be `INT` or `GCBOX`, so in cases where we've checked to see if `self` is an `INT`, the only remaining case is `GCBOX`. The locations changed in this commit implicitly checked that `self` was a `GCBOX` twice: by using unsafe `gcbox_to_tobj` function, we can remove the second (pointless) check. This is a just about measurable improvement on the JSON benchmark at about 1%. Co-authored-by: Laurence Tratt <[email protected]>
bors try |
tryBuild succeeded: |
bors try |
tryBuild succeeded: |
.buildbot.sh
Outdated
# Install no toolchain initially to ensure toolchain rollback. | ||
sh rustup.sh --default-host x86_64-unknown-linux-gnu --default-toolchain none -y --no-modify-path | ||
|
||
sh rustup.sh --default-host x86_64-unknown-linux-gnu --default-toolchain nightly -y --no-modify-path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we select the minimal profile here? If so we can kill the following invocation of rustup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can. Fixed in 0a47536.
bors try |
tryBuild succeeded: |
I found the number of args was getting out of hand, so I've done a reformat. But otherwise I think this might be ready for squashing? |
Great! Can't comment on the other changes, but looks like it's pre-reviewed by Jake. Please squash. |
There are two PRs which affect us: rust-lang/rust#74850 rust-lang/rust#75152 Henceforth, we should probably be keeping a close eye on and contributing to: https://github.com/rust-lang/wg-allocators/issues
Squashed. |
bors r+ |
Build succeeded: |
There are two PRs which affect us:
rust-lang/rust#74850
rust-lang/rust#75152
Henceforth, we should probably be keeping a close eye on and contributing to:
https://github.com/rust-lang/wg-allocators/issues