Skip to content

Commit

Permalink
Source FIXME annotations for issue rust-lang#81 and a correction to S…
Browse files Browse the repository at this point in the history
…TMT_bind fmt.
  • Loading branch information
froystig committed Jul 22, 2010
1 parent a61be2d commit 1ae13b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/boot/fe/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit =

| STMT_bind (dst, fn, arg_opts) ->
fmt_lval ff dst;
fmt ff " = ";
fmt ff " = bind ";
fmt_lval ff fn;
fmt_atom_opts ff arg_opts;
fmt ff ";";
Expand Down
5 changes: 4 additions & 1 deletion src/boot/me/trans.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3818,7 +3818,7 @@ let trans_visitor
(*
* NB: 'all_*_args', both self and callee, are always 4-tuples:
*
* [out_ptr, task_ptr, [args], [indirect_args]]
* [out_ptr, task_ptr, indirect_args, ty_params, [args]]
*
* The first few bindings here just destructure those via GEP.
*
Expand All @@ -3833,6 +3833,9 @@ let trans_visitor
get_element_ptr all_self_args_cell Abi.calltup_elt_ty_params
in
let callee_args_cell =
(* FIXME (issue #81): Once we've actually got proper ty_params,
* we should GEP dynamically here to get the args, since they may
* be aligned dynamically if they have parameterized type. *)
get_element_ptr all_callee_args_cell Abi.calltup_elt_args
in
let self_indirect_args_cell =
Expand Down
12 changes: 7 additions & 5 deletions src/lib/_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ fn init_fn[T](&init_op[T] op, uint n_elts) -> vec[T] {
}

fn init_elt[T](&T t, uint n_elts) -> vec[T] {
// FIXME: should be:
// fn elt_op[X](X x, uint i) -> X { ret x; }
// auto inner = bind elt_op[T](t, _);
// ret init_fn[T](inner, n_elts);
// but this does not work presently.
/**
* FIXME (issue #81): should be:
*
* fn elt_op[T](T x, uint i) -> T { ret x; }
* let init_op[T] inner = bind elt_op[T](t, _);
* ret init_fn[T](inner, n_elts);
*/
let vec[T] v = alloc[T](n_elts);
let uint i = n_elts;
while (i > uint(0)) {
Expand Down

0 comments on commit 1ae13b3

Please sign in to comment.