Uh oh!
There was an error while loading. Please reload this page.
Refactor rustc_codegen_ssa - #56198
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| type Value = &'ll Value; | ||
| type BasicBlock = &'ll BasicBlock; | ||
| type Type = &'ll Type; | ||
| type Context = &'ll llvm::Context; |
| } | ||
| fn abort(&mut self) { | ||
| let fnname = self.cx().get_intrinsic(&("llvm.trap")); |
There was a problem hiding this comment.
@sunfishcode I think this builder method should be called trap, wdyt?
There was a problem hiding this comment.
In cranelift the Interrupt trap can be resumed.
There was a problem hiding this comment.
Yeah, Cranelift should add an explicit way to request an "abort" trap.
There was a problem hiding this comment.
I like how bx.abort() lines up with mir::TerminatorKind::Abort. But either way works for me.
| #[derive(Copy, Clone)] | ||
| pub enum OverflowOp { | ||
| Add, Sub, Mul | ||
| } |
There was a problem hiding this comment.
@denismerigoux put some enums in common.rs but I'm not sure, this might be better.
Uh oh!
There was an error while loading. Please reload this page.
eddyb
commented
Nov 25, 2018
@bors r+ |
bors
commented
Nov 25, 2018
📌 Commit 36baa97 has been approved by |
| Usize(u64), | ||
| Nullptr, | ||
| FnPtr(Instance<'tcx>), | ||
| } |
There was a problem hiding this comment.
Note that this should be done without an EvalContext. With my recent changes to Allocations this should be mostly possible. I was hoping on getting https://github.com/rust-lang/rust/pull/55392/files#diff-2eb1005fe45cbe73c0ddfcde017b5f73R83 into master before having to address vtable generation, because that function would make such an operation trivial. You can still look at that function as a reference for creating the function that generates a vtable Allocation
There was a problem hiding this comment.
The code should probably move to rustc::mir::interpret::traits, too
There was a problem hiding this comment.
I am backing out the vtable generation changes for now, because they are a bit too much work for me right now.
8a67d20 to
cd66200Comparerust-highfive
commented
Nov 29, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
eddyb
commented
Dec 2, 2018
@bors r+ |
bors
commented
Dec 2, 2018
📌 Commit d108a91 has been approved by |
bors
commented
Dec 2, 2018
Refactor rustc_codegen_ssa cc #56108 (not all things are done yet) This removes an unsafe method from cg_ssa. r? @eddyb cc @sunfishcode
bors
commented
Dec 2, 2018
☀️ Test successful - status-appveyor, status-travis |
cc #56108 (not all things are done yet)
This removes an unsafe method from cg_ssa.
r? @eddyb
cc @sunfishcode