-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
LLVM assertion when creating region pointer for bare self value #5280
Labels
A-lifetimes
Area: Lifetimes / regions
A-trait-system
Area: Trait system
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone
Comments
assigning bug; change assignment if you disagree |
Reproduced with efd1438 |
This seems to be fixed on 887ae82 (linux 64). |
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 29, 2013
Currently we pass all "self" arguments by reference, for the pointer variants this means that we end up with double indirection which causes a unnecessary performance hit. The fix itself is pretty straight-forward and just means that "self" needs to be handled like any other argument, except for by-value "self" which still needs to be passed by reference. This is because non-pointer types can't just be stuffed into the environment slot which is used to pass "self". What made things tricky is that there was also a bug in the typechecker where the method map entries are created. For type impls, that stored the base type instead of the actual self-type in the method map, e.g. Foo instead of &Foo for &self. That worked with pass-by-reference, but fails with pass-by-value which needs the real type. Code that makes use of methods seems to be about 10% faster with this change. Also, build times are reduced by about 4%. Fixes rust-lang#4355, rust-lang#4402, rust-lang#5280, rust-lang#4406 and rust-lang#7285
bors
added a commit
that referenced
this issue
Jun 29, 2013
Currently we pass all "self" arguments by reference, for the pointer variants this means that we end up with double indirection which causes a unnecessary performance hit. The fix itself is pretty straight-forward and just means that "self" needs to be handled like any other argument, except for by-value "self" which still needs to be passed by reference. This is because non-pointer types can't just be stuffed into the environment slot which is used to pass "self". What made things tricky is that there was also a bug in the typechecker where the method map entries are created. For type impls, that stored the base type instead of the actual self-type in the method map, e.g. Foo instead of &Foo for &self. That worked with pass-by-reference, but fails with pass-by-value which needs the real type. Code that makes use of methods seems to be about 10% faster with this change. Also, build times are reduced by about 4%. Fixes #4355, #4402, #5280, #4406 and #7285
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 2, 2020
…ip1995,Manishearth needless_doc_main: only check rust code This fixes rust-lang#5280 by checking the language attribute on code blocks. --- changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lifetimes
Area: Lifetimes / regions
A-trait-system
Area: Trait system
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
rustc: /run/media/jdm/ssd/rust/src/llvm/lib/VMCore/Instructions.cpp:2383: static llvm::CastInst* llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion
S->getType()->isPointerTy() && "Invalid cast"' failed.`The text was updated successfully, but these errors were encountered: