Skip to content

Use rustc generated shims instead of interpreter hacks #156

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

Merged
merged 32 commits into from
Apr 21, 2017

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 23, 2017

fixes #119

Unfortunately I broke some things:

1904 success, 197 no mir, 206 crate not found, 71 failed, 46 C fn, 0 ABI, 121 unsupported, 6 intrinsic
1910 success, 197 no mir, 206 crate not found, 64 failed, 46 C fn, 0 ABI, 122 unsupported, 6 intrinsic
1918 success, 197 no mir, 206 crate not found, 56 failed, 46 C fn, 0 ABI, 122 unsupported, 6 intrinsic
1921 success, 199 no mir, 206 crate not found, 51 failed, 46 C fn, 0 ABI, 122 unsupported, 6 intrinsic
1925 success, 200 no mir, 206 crate not found, 46 failed, 46 C fn, 0 ABI, 122 unsupported, 6 intrinsic

  14 main function not found
  12 a raw memory access tried to access part of a pointer value as raw bytes
   9 the evaluated program panicked
   2 attempted to do math or a comparison on pointers into different allocations
   2 Overflow(Add) at /checkout/src/libcore/ops.rs:263:45: 263:57
   1 unused import: `std::option`
   1 tried to call a function with sig extern "C" fn(usize) -> Foo through a function pointer of type extern "C" fn(usize) -> u32
   1 tried to call a function with sig extern "C" fn(&isize) -> std::option::Option<&isize> through a function pointer of type extern "C" fn(&isize) -> &isize
   1 tried to access memory with alignment 1, but alignment 8 is required
   1 src/step.rs:250: static def id doesn't point to item
   1 internal compiler 
   1 Overflow(Neg) at /checkout/src/libcore/ops.rs:758:43: 758:45

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 23, 2017

And travis broke due to travis moving to rustup 🎉

let env = self.tcx.empty_parameter_environment();
let needs_drop = self.tcx.type_needs_drop_given_env(ty, &env);
self.write_primval(dest, PrimVal::from_bool(needs_drop), dest_ty)?;
}

"offset" => {
let pointee_ty = substs.type_at(0);
let pointee_ty = instance.substs.type_at(0);
Copy link
Member

Choose a reason for hiding this comment

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

I feel like all of these wouldn't need to be changed if you copied substs out. It's just a reference anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I want to do some cleanups after everything works.

Copy link
Member

Choose a reason for hiding this comment

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

Do you still plan to do some cleanups? Should I wait until those are done before reviewing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not in this PR. I wanted to separate it from any cleanup noise

Copy link
Member

Choose a reason for hiding this comment

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

IMO it's a very simple change in this function that cleans up the diff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@dwrensha
Copy link
Contributor

For the sake of quick cross-reference, here's a link to the copied-in code from rustc_trans::monomorphize: monomorphize.rs

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 23, 2017

Ok... I fixed all the fallout.

We have one new Overflow(Add)

full log

@arielb1's changes fixed all 3 of our Type parameter T/#0(T/0) out of range bugs

@solson
Copy link
Member

solson commented Apr 20, 2017

Sorry for the delay. I've added @eddyb and @oli-obk as collaborators on the repo so you two can make progress without blocking on me. Unfortunately, I don't have much free time/energy these days to spend on this. That said, I'll still be following the progress and reviewing as much as I can. I'll also be looking for ways to fit this back into my life again, but I shouldn't make any promises.

Feel free to either commit to master or continue doing PRs - I'll try to keep pace either way. Just don't consider my approval a requirement from now on.

@eddyb
Copy link
Member

eddyb commented Apr 20, 2017

@oli-obk Can you update to the latest nightly or should I try?

EDIT: I restarted Travis which should check the latest nightly.

@eddyb
Copy link
Member

eddyb commented Apr 20, 2017

Unable to update https://github.com/quininer/byteorder.git?branch=i128#ef51df29

Probably needs to be switched to 9bab6d7783f81da50feb234a120c918d9eabba6e now, or just the branch left in, if that's possible (it's a feature branch so they force pushed).

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 20, 2017

Won't get to this before tuesday

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 20, 2017

You need to change the got path to the official master branch. We are on an unofficial repo right now

@eddyb
Copy link
Member

eddyb commented Apr 20, 2017

@oli-obk Did the i128 branch get merged or something? AFAICT miri needs the i128 support. So I updated the hash to the top of the branch (hope you don't mind me committing on your master - you should use a different branch because @solson and me get to modify your master branch :))).

@eddyb
Copy link
Member

eddyb commented Apr 21, 2017

@oli-obk tests/compile-fail/never_say_never.rs looks like it now enters an infinite loop?

@eddyb eddyb merged commit 9a32772 into rust-lang:master Apr 21, 2017
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.

bad substs for tuple-like constructor function pointer
4 participants