Update servo to rust 3b6f5a1. Removes extraneous by-ref parameter to option::get(), and removes binary move operator.

This commit is contained in:
Brian J. Burg 2012-10-24 14:27:10 -07:00
parent c255509688
commit a7c796aaf1
10 changed files with 16 additions and 23 deletions

View file

@ -8,7 +8,7 @@ against a released version of Rust will not work, nor will the Rust
'master' branch. The commit below will *probably* work. If it does not
then the topic in #servo might know better.
* Last known-good Rust commit: 754704ea9442ce92602f8022f6c979824b016842
* Last known-good Rust commit: 3b6f5a1
[rust]: http://www.rust-lang.org

@ -1 +1 @@
Subproject commit b178de413ad288ba47160a4691cd8a32eddd359c
Subproject commit ad15d6ac9c632018da7765b4a6f2037a224f4383

@ -1 +1 @@
Subproject commit 00adb11b227604d3de74d67f14e7b3deef87ef56
Subproject commit cdedc9a50d0c59de945867c72f15e9694f7a73e9

View file

@ -208,11 +208,11 @@ impl Content {
self.window = Some(@move window);
self.doc_url = Some(move url);
let compartment = option::expect(&self.compartment, ~"TODO error checking");
let compartment = option::expect(self.compartment, ~"TODO error checking");
compartment.define_functions(debug_fns);
define_bindings(compartment,
option::get(&self.document),
option::get(&self.window));
option::get(self.document),
option::get(self.window));
do vec::consume(move js_scripts) |_i, bytes| {
self.cx.evaluate_script(compartment.global_obj, move bytes, ~"???", 1u);
@ -222,7 +222,7 @@ impl Content {
}
Timer(timerData) => {
let compartment = option::expect(&self.compartment, ~"TODO error checking");
let compartment = option::expect(self.compartment, ~"TODO error checking");
let thisValue = if timerData.args.len() > 0 {
RUST_JSVAL_TO_OBJECT(unsafe { timerData.args.shift() })
} else {
@ -245,7 +245,7 @@ impl Content {
println(fmt!("Error opening %s: %s", url_to_str(copy url), msg));
}
Ok(move bytes) => {
let compartment = option::expect(&self.compartment, ~"TODO error checking");
let compartment = option::expect(self.compartment, ~"TODO error checking");
compartment.define_functions(debug_fns);
self.cx.evaluate_script(compartment.global_obj, move bytes, copy url.path, 1u);
}

View file

@ -88,14 +88,14 @@ impl TokenReader : ParserMethods {
loop {
let tok = self.get();
let built_sel <- cur_sel;
let built_sel = move cur_sel;
match tok {
tok::Descendant => {
match self.parse_element() {
Some(elmt) => {
let new_sel = copy elmt;
cur_sel <- ~css::Descendant(move built_sel, move new_sel)
cur_sel = ~css::Descendant(move built_sel, move new_sel)
}
None => { return None; }
}
@ -104,7 +104,7 @@ impl TokenReader : ParserMethods {
match self.parse_element() {
Some(elmt) => {
let new_sel = copy elmt;
cur_sel <- ~css::Child(move built_sel, move new_sel)
cur_sel = ~css::Child(move built_sel, move new_sel)
}
None => { return None; }
}
@ -113,7 +113,7 @@ impl TokenReader : ParserMethods {
match self.parse_element() {
Some(elmt) => {
let new_sel = copy elmt;
cur_sel <- ~css::Sibling(move built_sel, move new_sel)
cur_sel = ~css::Sibling(move built_sel, move new_sel)
}
None => { return None; }
}

View file

@ -72,7 +72,7 @@ unsafe fn domstring_to_jsval(cx: *JSContext, str: &DOMString) -> JSVal {
pub fn get_compartment(cx: *JSContext) -> compartment {
unsafe {
let content = task_from_context(cx);
let compartment = option::expect(&(*content).compartment,
let compartment = option::expect((*content).compartment,
~"Should always have compartment when \
executing JS code");
assert cx == compartment.cx.ptr;

View file

@ -154,7 +154,7 @@ impl<T: Copy Send,A> Scope<T,A> {
}
unsafe fn free<T:Send>(t: *T) {
let _x <- *cast::reinterpret_cast::<*T,*mut T>(&t);
let _x = move *cast::reinterpret_cast::<*T,*mut T>(&t);
libc::free(cast::reinterpret_cast(&t));
}

View file

@ -75,7 +75,7 @@ priv fn simulate_UA_display_rules(node: Node) -> CSSDisplay {
}
impl BoxGenerator {
pub static pure fn new(flow: @FlowContext) -> BoxGenerator {
static pub pure fn new(flow: @FlowContext) -> BoxGenerator {
unsafe { debug!("Creating box generator for flow: %s", flow.debug_str()); }
BoxGenerator {
flow: flow,

View file

@ -102,14 +102,7 @@ fn mainloop(mode: Mode, po: comm::Port<Msg>, dom_event_chan: pipes::SharedChan<E
Size2D(800.0f32, 600.0f32));
let done = @mut false;
let resize_rate_limiter = @ResizeRateLimiter(move dom_event_chan);
#macro[
[#moov[x],
unsafe { let y <- *ptr::addr_of(x); y }]
];
let check_for_messages = fn@() {
// Periodically check if content responded to our last resize event

View file

@ -40,7 +40,7 @@ impl SendableTextRun {
}
impl TextRun {
pub static fn new(font: @Font, text: ~str) -> TextRun {
static pub fn new(font: @Font, text: ~str) -> TextRun {
let glyph_store = GlyphStore(text.len());
let run = TextRun {
text: move text,