Skip to content

Commit e6024f3

Browse files
authored
Merge pull request #246 from rust-lang/cleanup
Cleanup
2 parents f6ad065 + fa6ae3c commit e6024f3

File tree

7 files changed

+27
-30
lines changed

7 files changed

+27
-30
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ debug_gimple_stmt(gimple_struct)
172172
173173
To get the `rustc` command to run in `gdb`, add the `--verbose` flag to `cargo build`.
174174
175-
To have the correct file paths in `gdb` instead of `/usr/src/debug/gcc/libstdc++-v3/libsupc++/eh_personality.cc`, TODO
175+
To have the correct file paths in `gdb` instead of `/usr/src/debug/gcc/libstdc++-v3/libsupc++/eh_personality.cc`:
176176
177177
Maybe by calling the following at the beginning of gdb:
178178
179179
```
180180
set substitute-path /usr/src/debug/gcc /path/to/gcc-repo/gcc
181181
```
182182
183-
TODO: but that's not what I remember I was doing.
183+
TODO(antoyo): but that's not what I remember I was doing.
184184
185185
### How to use a custom-build rustc
186186

failing-ui-tests.txt

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,22 @@ src/test/ui/allocator/xcrate-use.rs
99
src/test/ui/allocator/xcrate-use2.rs
1010
src/test/ui/asm/may_unwind.rs
1111
src/test/ui/asm/x86_64/multiple-clobber-abi.rs
12-
src/test/ui/async-await/async-fn-size-moved-locals.rs
13-
src/test/ui/async-await/async-fn-size-uninit-locals.rs
14-
src/test/ui/cfg/cfg-panic.rs
1512
src/test/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs
1613
src/test/ui/functions-closures/parallel-codegen-closures.rs
17-
src/test/ui/generator/size-moved-locals.rs
18-
src/test/ui/issues/issue-40883.rs
19-
src/test/ui/issues/issue-47364.rs
2014
src/test/ui/linkage-attr/linkage1.rs
2115
src/test/ui/lto/dylib-works.rs
22-
src/test/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs
23-
src/test/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs
2416
src/test/ui/numbers-arithmetic/saturating-float-casts.rs
2517
src/test/ui/polymorphization/promoted-function.rs
2618
src/test/ui/process/nofile-limit.rs
27-
src/test/ui/runtime/rt-explody-panic-payloads.rs
2819
src/test/ui/sepcomp/sepcomp-cci.rs
2920
src/test/ui/sepcomp/sepcomp-extern.rs
3021
src/test/ui/sepcomp/sepcomp-fns-backwards.rs
3122
src/test/ui/sepcomp/sepcomp-fns.rs
3223
src/test/ui/sepcomp/sepcomp-statics.rs
3324
src/test/ui/simd/intrinsic/generic-arithmetic-pass.rs
3425
src/test/ui/simd/intrinsic/generic-gather-pass.rs
35-
src/test/ui/simd/issue-17170.rs
36-
src/test/ui/simd/issue-39720.rs
37-
src/test/ui/simd/issue-85915-simd-ptrs.rs
38-
src/test/ui/simd/issue-89193.rs
3926
src/test/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs
4027
src/test/ui/sse2.rs
41-
src/test/ui/statics/issue-91050-1.rs
42-
src/test/ui/statics/issue-91050-2.rs
4328
src/test/ui/target-feature/missing-plusminus.rs
4429
src/test/ui/asm/x86_64/may_unwind.rs
4530
src/test/ui/backtrace.rs
@@ -52,9 +37,6 @@ src/test/ui/generator/panic-drops-resume.rs
5237
src/test/ui/generator/panic-drops.rs
5338
src/test/ui/generator/panic-safe.rs
5439
src/test/ui/intrinsics/panic-uninitialized-zeroed.rs
55-
src/test/ui/issues/issue-14875.rs
56-
src/test/ui/issues/issue-29948.rs
57-
src/test/ui/issues/issue-43853.rs
5840
src/test/ui/iterators/iter-sum-overflow-debug.rs
5941
src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs
6042
src/test/ui/mir/mir_calls_to_shims.rs
@@ -64,6 +46,18 @@ src/test/ui/oom_unwind.rs
6446
src/test/ui/panic-runtime/abort-link-to-unwinding-crates.rs
6547
src/test/ui/panic-runtime/abort.rs
6648
src/test/ui/panic-runtime/link-to-abort.rs
49+
src/test/ui/unwind-no-uwtable.rs
50+
src/test/ui/issues/issue-14875.rs
51+
src/test/ui/issues/issue-29948.rs
52+
src/test/ui/issues/issue-40883.rs
53+
src/test/ui/issues/issue-43853.rs
54+
src/test/ui/issues/issue-47364.rs
55+
src/test/ui/simd/issue-17170.rs
56+
src/test/ui/simd/issue-39720.rs
57+
src/test/ui/simd/issue-85915-simd-ptrs.rs
58+
src/test/ui/simd/issue-89193.rs
59+
src/test/ui/statics/issue-91050-1.rs
60+
src/test/ui/statics/issue-91050-2.rs
61+
src/test/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs
6762
src/test/ui/rfc-2091-track-caller/std-panic-locations.rs
6863
src/test/ui/rfcs/rfc1857-drop-order.rs
69-
src/test/ui/unwind-no-uwtable.rs

failing-ui-tests12.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs
3131
src/test/ui/panic-while-printing.rs
3232
src/test/ui/privacy/reachable-unnameable-items.rs
3333
src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs
34+
src/test/ui/async-await/async-fn-size-moved-locals.rs
35+
src/test/ui/async-await/async-fn-size-uninit-locals.rs
36+
src/test/ui/cfg/cfg-panic.rs
37+
src/test/ui/generator/size-moved-locals.rs
38+
src/test/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs
39+
src/test/ui/runtime/rt-explody-panic-payloads.rs

src/builder.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
375375
impl<'a, 'gcc, 'tcx> Deref for Builder<'a, 'gcc, 'tcx> {
376376
type Target = CodegenCx<'gcc, 'tcx>;
377377

378-
fn deref<'b>(&'b self) -> &'a Self::Target
379-
{
378+
fn deref<'b>(&'b self) -> &'a Self::Target {
380379
self.cx
381380
}
382381
}
@@ -1216,7 +1215,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
12161215
let value = self.current_func().new_local(None, struct_type.as_type(), "landing_pad");
12171216
let ptr = self.cx.context.new_cast(None, ptr, field1_type);
12181217
self.block.add_assignment(None, value.access_field(None, field1), ptr);
1219-
self.block.add_assignment(None, value.access_field(None, field2), zero); // TODO: set the proper value here (the type of exception?).
1218+
self.block.add_assignment(None, value.access_field(None, field2), zero); // TODO(antoyo): set the proper value here (the type of exception?).
12201219

12211220
value.to_rvalue()
12221221
}
@@ -1232,7 +1231,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
12321231

12331232
#[cfg(feature="master")]
12341233
fn resume(&mut self, exn: RValue<'gcc>) {
1235-
// TODO: check if this is normal that we need to dereference the value.
1234+
// TODO(antoyo): check if this is normal that we need to dereference the value.
12361235
// NOTE: the type is wrong, so in order to get a pointer for parameter, cast it to a
12371236
// pointer of pointer that is later dereferenced.
12381237
let exn_type = exn.get_type().make_pointer();

src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>)
3030

3131
let func =
3232
if let Some(_func) = cx.get_declared_value(&sym) {
33-
// FIXME: we never reach this because get_declared_value only returns global variables
33+
// FIXME(antoyo): we never reach this because get_declared_value only returns global variables
3434
// and here we try to get a function.
3535
unreachable!();
3636
/*

src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
258258

259259
pub fn rvalue_as_function(&self, value: RValue<'gcc>) -> Function<'gcc> {
260260
let function: Function<'gcc> = unsafe { std::mem::transmute(value) };
261-
// FIXME: seems like self.functions get overwritten for rust_eh_personality.
262261
debug_assert!(self.functions.borrow().values().find(|value| **value == function).is_some(),
263262
"{:?} is not a function", function);
264263
function
@@ -334,6 +333,7 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
334333
fn get_fn(&self, instance: Instance<'tcx>) -> RValue<'gcc> {
335334
let func = get_fn(self, instance);
336335
*self.current_func.borrow_mut() = Some(func);
336+
// FIXME(antoyo): this is a wrong cast. That requires changing the compiler API.
337337
unsafe { std::mem::transmute(func) }
338338
}
339339

src/intrinsic/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,6 @@ fn try_intrinsic<'a, 'b, 'gcc, 'tcx>(bx: &'b mut Builder<'a, 'gcc, 'tcx>, try_fu
11581158
// the right personality function.
11591159
#[cfg(feature="master")]
11601160
fn codegen_gnu_try<'gcc>(bx: &mut Builder<'_, 'gcc, '_>, try_func: RValue<'gcc>, data: RValue<'gcc>, catch_func: RValue<'gcc>, dest: RValue<'gcc>) {
1161-
//use std::ops::Deref;
1162-
//let cx: &CodegenCx<'gcc, '_> = bx.deref();
11631161
let cx: &CodegenCx<'gcc, '_> = bx.cx;
11641162
let (llty, func) = get_rust_try_fn(cx, &mut |mut bx| {
11651163
// Codegens the shims described above:
@@ -1204,7 +1202,7 @@ fn codegen_gnu_try<'gcc>(bx: &mut Builder<'_, 'gcc, '_>, try_func: RValue<'gcc>,
12041202

12051203
// NOTE: the blocks must be filled before adding the try/catch, otherwise gcc will not
12061204
// generate a try/catch.
1207-
// FIXME: add a check in the libgccjit API to prevent this.
1205+
// FIXME(antoyo): add a check in the libgccjit API to prevent this.
12081206
bx.switch_to_block(current_block);
12091207
bx.invoke(try_func_ty, try_func, &[data], then, catch, None);
12101208
});

0 commit comments

Comments
 (0)