Skip to content

Commit

Permalink
response for review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed Oct 15, 2014
1 parent 1ee345a commit 61ab2ea
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/librustc/middle/trans/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,12 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
}

pub fn max_obj_size(&self) -> u64 {
1<<31 /* FIXME: select based on architecture */
1<<31 /* FIXME #18069: select based on architecture */
}

pub fn report_overbig_object(&self, obj: ty::t) -> ! {
self.sess().fatal(
format!("Objects of type `{}` are too big for the current ABI",
format!("the type `{}` is too big for the current architecture",
obj.repr(self.tcx())).as_slice())
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/trans/controlflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ pub fn trans_fail<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
let loc = bcx.sess().codemap().lookup_char_pos(sp.lo);
let filename = token::intern_and_get_ident(loc.file.name.as_slice());
let filename = C_str_slice(ccx, filename);
let line = C_int(ccx, loc.line as i64);
let line = C_uint(ccx, loc.line);
let expr_file_line_const = C_struct(ccx, &[v_str, filename, line], false);
let expr_file_line = consts::const_addr_of(ccx, expr_file_line_const, ast::MutImmutable);
let args = vec!(expr_file_line);
Expand All @@ -526,7 +526,7 @@ pub fn trans_fail_bounds_check<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,

// Invoke the lang item
let filename = C_str_slice(ccx, filename);
let line = C_int(ccx, loc.line as i64);
let line = C_uint(ccx, loc.line);
let file_line_const = C_struct(ccx, &[filename, line], false);
let file_line = consts::const_addr_of(ccx, file_line_const, ast::MutImmutable);
let args = vec!(file_line, index, len);
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/trans/type_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ use std::num::CheckedMul;

// LLVM doesn't like objects that are too big. Issue #17913
fn ensure_array_fits_in_address_space(ccx: &CrateContext,
llet: Type,
size: machine::llsize,
scapegoat: ty::t) {
llet: Type,
size: machine::llsize,
scapegoat: ty::t) {
let esz = machine::llsize_of_alloc(ccx, llet);
match esz.checked_mul(&size) {
Some(n) if n < ccx.max_obj_size() => {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: too big for the current ABI
// error-pattern: too big for the current

fn main() {
let fat : [u8, ..1<<61] = [0, ..1<<61];
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: are too big for the current ABI
// error-pattern: too big for the current

struct S32<T> {
v0: T,
Expand Down

0 comments on commit 61ab2ea

Please sign in to comment.