Skip to content

Commit 2207c7b

Browse files
committed
---
yaml --- r: 14556 b: refs/heads/try c: 7d0958f h: refs/heads/master v: v3
1 parent 80fda81 commit 2207c7b

File tree

6 files changed

+38
-2
lines changed

6 files changed

+38
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 3d104cfb410211cb313a50c6cdb8b652f62ce9f4
5+
refs/heads/try: 7d0958f70ff16ee40649a943306c9b104a5fc829
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/middle/trans/base.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4583,6 +4583,13 @@ fn collect_inlined_items(ccx: crate_ctxt, inline_map: inline::inline_map) {
45834583
let abi = @mutable none::<ast::native_abi>;
45844584
inline_map.values {|item|
45854585
collect_item(ccx, abi, item);
4586+
4587+
alt item.node {
4588+
ast::item_fn(_, _, _) {
4589+
set_always_inline(ccx.item_ids.get(item.id));
4590+
}
4591+
_ { /* fallthrough */ }
4592+
}
45864593
}
45874594
}
45884595

branches/try/src/libcore/sys.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ native mod rustrt {
2020
fn unsupervise();
2121
fn shape_log_str<T>(t: *sys::type_desc, data: T) -> str;
2222
fn rust_set_exit_status(code: ctypes::intptr_t);
23+
fn rust_frame_address() -> ctypes::uintptr_t;
2324
}
2425

2526
#[abi = "rust-intrinsic"]
@@ -77,6 +78,10 @@ fn log_str<T>(t: T) -> str {
7778
rustrt::shape_log_str(get_type_desc::<T>(), t)
7879
}
7980

81+
fn frame_address() -> uint {
82+
rustrt::rust_frame_address()
83+
}
84+
8085
#[doc(
8186
brief = "Sets the process exit code",
8287
desc = "Sets the exit code returned by the process if all supervised \

branches/try/src/rt/rust_builtin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "rust_util.h"
77
#include "rust_scheduler.h"
88
#include "sync/timer.h"
9+
#include "rust_abi.h"
910

1011
#ifdef __APPLE__
1112
#include <crt_externs.h>
@@ -681,6 +682,11 @@ rust_dbg_call(dbg_callback cb, void *data) {
681682
return cb(data);
682683
}
683684

685+
extern "C" CDECL void *
686+
rust_frame_address() {
687+
return __builtin_frame_address(1);
688+
}
689+
684690
//
685691
// Local Variables:
686692
// mode: C++

branches/try/src/rt/rust_util.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ inline size_t vec_size(size_t elems) {
8787
return sizeof(rust_vec) + sizeof(T) * elems;
8888
}
8989

90+
template <typename T>
91+
inline rust_vec *
92+
vec_alloc(size_t alloc_elts, size_t fill_elts, const char *name) {
93+
rust_task *task = rust_task_thread::get_task();
94+
size_t size = vec_size<T>(alloc_elts);
95+
rust_vec *vec = (rust_vec *) task->kernel->malloc(size, name);
96+
vec->fill = fill_elts * sizeof(T);
97+
vec->alloc = alloc_elts * sizeof(T);
98+
return vec;
99+
}
100+
101+
template <typename T>
102+
inline T *
103+
vec_data(rust_vec *v) {
104+
return reinterpret_cast<T*>(v->data);
105+
}
106+
90107
inline void reserve_vec_exact(rust_task* task, rust_vec** vpp, size_t size) {
91108
if (size > (*vpp)->alloc) {
92109
*vpp = (rust_vec*)task->kernel->realloc(*vpp, size + sizeof(rust_vec));

branches/try/src/rt/rustrt.def.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ rust_dbg_lock_lock
100100
rust_dbg_lock_unlock
101101
rust_dbg_lock_wait
102102
rust_dbg_lock_signal
103-
rust_dbg_call
103+
rust_dbg_call
104+
rust_frame_address

0 commit comments

Comments
 (0)