aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-26 18:55:47 -0700
committerRoy Frostig <[email protected]>2010-08-26 18:55:53 -0700
commitaa3030432862cf7694dc6b37c3fe8f8985741c86 (patch)
tree00c8665c8ee9cf86ede3373c359c517f02c3524c /src
parentEncode tag names in the DWARF (diff)
downloadrust-aa3030432862cf7694dc6b37c3fe8f8985741c86.tar.xz
rust-aa3030432862cf7694dc6b37c3fe8f8985741c86.zip
Simplify null-writing from commit 8559a85ccacf70c51d93759b47a3880ae818b247 so as to avoid a branch.
Diffstat (limited to 'src')
-rw-r--r--src/boot/me/trans.ml10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index d83f6c52..39cfd0f4 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -3264,6 +3264,7 @@ let trans_visitor
get_element_ptr dst Abi.binding_field_bound_data
in
mov dst_item (Il.Cell src_item);
+ mov dst_binding zero;
let null_jmp = null_check src_binding in
(* Copy if we have a src binding. *)
(* FIXME (issue #58): this is completely wrong, call
@@ -3274,14 +3275,7 @@ let trans_visitor
dst_binding (Ast.TY_box Ast.TY_int)
src_binding (Ast.TY_box Ast.TY_int)
curr_iso;
- let end_jmp = mark() in
- emit (Il.jmp Il.JMP Il.CodeNone);
- patch null_jmp;
- (* The src had a null binding, so make sure the dst
- * does now too.
- *)
- mov dst_binding zero;
- patch end_jmp
+ patch null_jmp
end
| _ ->