diff options
| author | Graydon Hoare <[email protected]> | 2011-04-02 19:03:43 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-02 19:05:12 -0700 |
| commit | 8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76 (patch) | |
| tree | c893449b391e9aec1c6aa3299ab975b4cd053be0 /src/comp/middle | |
| parent | Gitignore the recommended build directory (diff) | |
| download | rust-8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76.tar.xz rust-8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76.zip | |
Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. Major perf win.
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 2e4f1d85..ee3ea2cd 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -372,6 +372,7 @@ fn T_vec(TypeRef t) -> TypeRef { ret T_struct(vec(T_int(), // Refcount T_int(), // Alloc T_int(), // Fill + T_int(), // Pad T_array(t, 0u) // Body elements )); } @@ -870,6 +871,7 @@ fn C_str(@crate_ctxt cx, str s) -> ValueRef { auto box = C_struct(vec(C_int(abi.const_refcount as int), C_int(len + 1u as int), // 'alloc' C_int(len + 1u as int), // 'fill' + C_int(0), // 'pad' llvm.LLVMConstString(_str.buf(s), len, False))); auto g = llvm.LLVMAddGlobal(cx.llmod, val_ty(box), |