Skip to content

Add idempotent promote for i8 and sync ykllvm#2119

Merged
ltratt merged 1 commit intoykjit:masterfrom
vext01:allow-optsize
Mar 6, 2026
Merged

Add idempotent promote for i8 and sync ykllvm#2119
ltratt merged 1 commit intoykjit:masterfrom
vext01:allow-optsize

Conversation

@vext01
Copy link
Contributor

@vext01 vext01 commented Mar 5, 2026

@ltratt ltratt enabled auto-merge March 5, 2026 17:56
@vext01
Copy link
Contributor Author

vext01 commented Mar 6, 2026

Never seen that kind of error before. Hoping it's transient. Give it a kick?

@ltratt ltratt disabled auto-merge March 6, 2026 09:13
@ltratt ltratt enabled auto-merge March 6, 2026 09:13
@ltratt ltratt disabled auto-merge March 6, 2026 09:13
@ltratt
Copy link
Contributor

ltratt commented Mar 6, 2026

Looks like the format check somehow failed and I don't know how to override it. Do you know how? If not, just force push to this branch and that should kick it.

@ltratt ltratt added this pull request to the merge queue Mar 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 6, 2026
@ltratt
Copy link
Contributor

ltratt commented Mar 6, 2026

Looks like rust nightly has changed something that's easy to fix. Please force push / add a commit as appropriate.

@vext01
Copy link
Contributor Author

vext01 commented Mar 6, 2026

Fixed.

@ltratt ltratt added this pull request to the merge queue Mar 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 6, 2026
@vext01 vext01 changed the title sync ykllvm Add idempotent promote for i8 and sync ykllvm Mar 6, 2026
@vext01
Copy link
Contributor Author

vext01 commented Mar 6, 2026

I've force pushed this to include stuff required to optimise bytecode dispatch in ykmicropython.

ykrt/src/mt.rs Outdated
/// here means that something has gone wrong elsewhere.
pub(crate) fn promote_i8(&mut self, val: i8) -> bool {
if let MTThreadState::Tracing { promotions, .. } = self.peek_mut_tstate() {
promotions.push(val as u8); // `as` intended -- it's the bit pattern we want.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cast_unsigned is preferred here (it's a newish API and is very nice!). Please force push.

This also pulls is the optsize serialiser change in ykllvm.
@vext01
Copy link
Contributor Author

vext01 commented Mar 6, 2026

Fixed.

@ltratt ltratt added this pull request to the merge queue Mar 6, 2026
Merged via the queue into ykjit:master with commit 5407e3a Mar 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants