Skip to content

Commit 7593c6e

Browse files
author
Elly Jones
committed
---
yaml --- r: 6896 b: refs/heads/master c: bbc534b h: refs/heads/master v: v3
1 parent 5a713b2 commit 7593c6e

File tree

8 files changed

+29
-92
lines changed

8 files changed

+29
-92
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: aeadc6269ef76f4425a49d892ceac7ea311ef5c1
2+
refs/heads/master: bbc534bcccfc1904104a1fa275a6a873a7675cd1

trunk/src/cargo/cargo.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type package = {
3131
uuid: str,
3232
url: str,
3333
method: str,
34+
ref: option::t<str>,
3435
tags: [str]
3536
};
3637

@@ -242,6 +243,11 @@ fn load_one_source_package(&src: source, p: map::hashmap<str, json::json>) {
242243
}
243244
};
244245

246+
let ref = alt p.find("ref") {
247+
some(json::string(_n)) { some(_n) }
248+
_ { none }
249+
};
250+
245251
let tags = [];
246252
alt p.find("tags") {
247253
some(json::list(js)) {
@@ -260,6 +266,7 @@ fn load_one_source_package(&src: source, p: map::hashmap<str, json::json>) {
260266
uuid: uuid,
261267
url: url,
262268
method: method,
269+
ref: ref,
263270
tags: tags
264271
});
265272
log " Loaded package: " + src.name + "/" + name;
@@ -398,8 +405,14 @@ fn install_source(c: cargo, path: str) {
398405
}
399406
}
400407

401-
fn install_git(c: cargo, wd: str, url: str) {
408+
fn install_git(c: cargo, wd: str, url: str, ref: option::t<str>) {
402409
run::run_program("git", ["clone", url, wd]);
410+
if option::is_some::<str>(ref) {
411+
let r = option::get::<str>(ref);
412+
fs::change_dir(wd);
413+
run::run_program("git", ["checkout", r]);
414+
}
415+
403416
install_source(c, wd);
404417
}
405418

@@ -424,7 +437,7 @@ fn install_file(c: cargo, wd: str, path: str) {
424437
fn install_package(c: cargo, wd: str, pkg: package) {
425438
info("Installing with " + pkg.method + " from " + pkg.url + "...");
426439
if pkg.method == "git" {
427-
install_git(c, wd, pkg.url);
440+
install_git(c, wd, pkg.url, pkg.ref);
428441
} else if pkg.method == "http" {
429442
install_curl(c, wd, pkg.url);
430443
} else if pkg.method == "file" {

trunk/src/cargo/sources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"url": "https://raw.github.com/graydon/cargo-central/master/packages.json"
44
},
55
"elly": {
6-
"url": "https://raw.github.com/elly/rust-packages/master/packages.json",
6+
"url": "https://raw.github.com/elly/rust-packages/master/packages.json"
77
"sig": "https://raw.github.com/elly/rust-packages/master/packages.json.sig",
88
"key": "https://raw.github.com/elly/rust-packages/master/signing-key.gpg",
99
"keyfp": "4107 21C0 FF32 858F 61FF 33F6 E595 8E36 FDC8 EA00"

trunk/src/libcore/core.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import option::{some, none};
77
import option = option::t;
88
export option, some, none;
9-
export repeat;
109

1110
// Export the log levels as global constants. Higher levels mean
1211
// more-verbosity. Error is the bottom level, default logging level is
@@ -16,16 +15,3 @@ const error : int = 0;
1615
const warn : int = 1;
1716
const info : int = 2;
1817
const debug : int = 3;
19-
20-
/*
21-
Function: repeat
22-
23-
Execute a function for a set number of times
24-
*/
25-
fn repeat(times: uint, f: block()) {
26-
let i = 0u;
27-
while i < times {
28-
f();
29-
i += 1u;
30-
}
31-
}

trunk/src/rt/circular_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class
99
circular_buffer : public kernel_owned<circular_buffer> {
10-
static const size_t INITIAL_CIRCULAR_BUFFER_SIZE_IN_UNITS = 1;
10+
static const size_t INITIAL_CIRCULAR_BUFFER_SIZE_IN_UNITS = 8;
1111
static const size_t MAX_CIRCULAR_BUFFER_SIZE = 1 << 24;
1212

1313
public:

trunk/src/rt/rust_task.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,23 @@ void rust_task::start()
397397
sched->lock.signal();
398398
}
399399

400+
void
401+
rust_task::grow(size_t n_frame_bytes)
402+
{
403+
// FIXME (issue #151): Just fail rather than almost certainly crashing
404+
// mysteriously later. The commented-out logic below won't work at all in
405+
// the presence of non-word-aligned pointers.
406+
abort();
407+
408+
}
409+
400410
// Only run this on the rust stack
401411
void
402412
rust_task::yield(size_t time_in_us, bool *killed) {
403413
if (this->killed) {
404414
*killed = true;
405415
}
406416

407-
// We're not going to need any extra stack for a while
408-
clear_stack_cache();
409-
410417
yield_timer.reset_us(time_in_us);
411418

412419
// Return to the scheduler.
@@ -749,15 +756,6 @@ rust_task::del_stack() {
749756
record_stack_limit();
750757
}
751758

752-
void
753-
rust_task::clear_stack_cache() {
754-
A(sched, stk != NULL, "Expected to have a stack");
755-
if (stk->prev != NULL) {
756-
free_stk(this, stk->prev);
757-
stk->prev = NULL;
758-
}
759-
}
760-
761759
void
762760
rust_task::record_stack_limit() {
763761
// The function prolog compares the amount of stack needed to the end of

trunk/src/rt/rust_task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ rust_task : public kernel_owned<rust_task>, rust_cond
138138
void start(uintptr_t spawnee_fn,
139139
uintptr_t args);
140140
void start();
141+
void grow(size_t n_frame_bytes);
141142
bool running();
142143
bool blocked();
143144
bool blocked_on(rust_cond *cond);
@@ -203,7 +204,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
203204
void reset_stack_limit();
204205
bool on_rust_stack();
205206
void check_stack_canary();
206-
void clear_stack_cache();
207207
};
208208

209209
//

trunk/src/test/bench/task-perf-one-million.rs

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)