Skip to content

Commit 1ae13b3

Browse files
committed
Source FIXME annotations for issue rust-lang#81 and a correction to STMT_bind fmt.
1 parent a61be2d commit 1ae13b3

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/boot/fe/ast.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit =
10131013

10141014
| STMT_bind (dst, fn, arg_opts) ->
10151015
fmt_lval ff dst;
1016-
fmt ff " = ";
1016+
fmt ff " = bind ";
10171017
fmt_lval ff fn;
10181018
fmt_atom_opts ff arg_opts;
10191019
fmt ff ";";

src/boot/me/trans.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3818,7 +3818,7 @@ let trans_visitor
38183818
(*
38193819
* NB: 'all_*_args', both self and callee, are always 4-tuples:
38203820
*
3821-
* [out_ptr, task_ptr, [args], [indirect_args]]
3821+
* [out_ptr, task_ptr, indirect_args, ty_params, [args]]
38223822
*
38233823
* The first few bindings here just destructure those via GEP.
38243824
*
@@ -3833,6 +3833,9 @@ let trans_visitor
38333833
get_element_ptr all_self_args_cell Abi.calltup_elt_ty_params
38343834
in
38353835
let callee_args_cell =
3836+
(* FIXME (issue #81): Once we've actually got proper ty_params,
3837+
* we should GEP dynamically here to get the args, since they may
3838+
* be aligned dynamically if they have parameterized type. *)
38363839
get_element_ptr all_callee_args_cell Abi.calltup_elt_args
38373840
in
38383841
let self_indirect_args_cell =

src/lib/_vec.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ fn init_fn[T](&init_op[T] op, uint n_elts) -> vec[T] {
2626
}
2727

2828
fn init_elt[T](&T t, uint n_elts) -> vec[T] {
29-
// FIXME: should be:
30-
// fn elt_op[X](X x, uint i) -> X { ret x; }
31-
// auto inner = bind elt_op[T](t, _);
32-
// ret init_fn[T](inner, n_elts);
33-
// but this does not work presently.
29+
/**
30+
* FIXME (issue #81): should be:
31+
*
32+
* fn elt_op[T](T x, uint i) -> T { ret x; }
33+
* let init_op[T] inner = bind elt_op[T](t, _);
34+
* ret init_fn[T](inner, n_elts);
35+
*/
3436
let vec[T] v = alloc[T](n_elts);
3537
let uint i = n_elts;
3638
while (i > uint(0)) {

0 commit comments

Comments
 (0)