Skip to content

Commit 1df02b8

Browse files
committed
---
yaml --- r: 73621 b: refs/heads/dist-snap c: e694e5f h: refs/heads/master i: 73619: 695d33d v: v3
1 parent 2a85ac3 commit 1df02b8

File tree

107 files changed

+1024
-1890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1024
-1890
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 91a707390045eb29e5392de1f7f5b9d5fdb64e65
10+
refs/heads/dist-snap: e694e5fc592491097470e996fb41bd25104252fc
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/etc/kate/rust.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<item> Copy </item>
5050
<item> Send </item>
5151
<item> Owned </item>
52-
<item> Sized </item>
5352
<item> Eq </item>
5453
<item> Ord </item>
5554
<item> Num </item>

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ syn keyword rustType size_t ptrdiff_t clock_t time_t
4444
syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4545
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4646

47-
syn keyword rustTrait Const Copy Send Owned Sized " inherent traits
47+
syn keyword rustTrait Const Copy Send Owned " inherent traits
4848
syn keyword rustTrait Eq Ord Num Ptr
4949
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
5050
syn keyword rustTrait BitXor Shl Shr Index

branches/dist-snap/src/etc/zsh/_rust

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

branches/dist-snap/src/libextra/bitv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -13,6 +13,7 @@ use core::prelude::*;
1313
use core::cmp;
1414
use core::ops;
1515
use core::uint;
16+
use core::vec::from_elem;
1617
use core::vec;
1718

1819
struct SmallBitv {

branches/dist-snap/src/libextra/ebml.rs

Lines changed: 71 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,32 @@ pub enum EbmlEncoderTag {
5151
EsI16, // 8
5252
EsI8, // 9
5353
EsBool, // 10
54-
EsChar, // 11
55-
EsStr, // 12
56-
EsF64, // 13
57-
EsF32, // 14
58-
EsFloat, // 15
59-
EsEnum, // 16
60-
EsEnumVid, // 17
61-
EsEnumBody, // 18
62-
EsVec, // 19
63-
EsVecLen, // 20
64-
EsVecElt, // 21
65-
EsMap, // 22
66-
EsMapLen, // 23
67-
EsMapKey, // 24
68-
EsMapVal, // 25
54+
EsStr, // 11
55+
EsF64, // 12
56+
EsF32, // 13
57+
EsFloat, // 14
58+
EsEnum, // 15
59+
EsEnumVid, // 16
60+
EsEnumBody, // 17
61+
EsVec, // 18
62+
EsVecLen, // 19
63+
EsVecElt, // 20
6964

7065
EsOpaque,
7166

72-
EsLabel, // Used only when debugging
67+
EsLabel // Used only when debugging
7368
}
7469
// --------------------------------------
7570

7671
pub mod reader {
77-
use super::*;
72+
use core::prelude::*;
7873

74+
use ebml::{Doc, EbmlEncoderTag, EsBool, EsEnum, EsEnumBody, EsEnumVid};
75+
use ebml::{EsI16, EsI32, EsI64, EsI8, EsInt};
76+
use ebml::{EsLabel, EsOpaque, EsStr, EsU16, EsU32, EsU64, EsU8, EsUint};
77+
use ebml::{EsVec, EsVecElt, EsVecLen, TaggedDoc};
7978
use serialize;
8079

81-
use core::prelude::*;
8280
use core::cast::transmute;
8381
use core::int;
8482
use core::io;
@@ -323,14 +321,12 @@ pub mod reader {
323321
r_doc
324322
}
325323

326-
fn push_doc<T>(&mut self, exp_tag: EbmlEncoderTag,
327-
f: &fn(&mut Decoder) -> T) -> T {
328-
let d = self.next_doc(exp_tag);
324+
fn push_doc<T>(&mut self, d: Doc, f: &fn() -> T) -> T {
329325
let old_parent = self.parent;
330326
let old_pos = self.pos;
331327
self.parent = d;
332328
self.pos = d.start;
333-
let r = f(self);
329+
let r = f();
334330
self.parent = old_parent;
335331
self.pos = old_pos;
336332
r
@@ -399,21 +395,10 @@ pub mod reader {
399395
doc_as_u8(self.next_doc(EsBool)) as bool
400396
}
401397

402-
fn read_f64(&mut self) -> f64 {
403-
let bits = doc_as_u64(self.next_doc(EsF64));
404-
unsafe { transmute(bits) }
405-
}
406-
fn read_f32(&mut self) -> f32 {
407-
let bits = doc_as_u32(self.next_doc(EsF32));
408-
unsafe { transmute(bits) }
409-
}
410-
fn read_float(&mut self) -> float {
411-
let bits = doc_as_u64(self.next_doc(EsFloat));
412-
(unsafe { transmute::<u64, f64>(bits) }) as float
413-
}
414-
fn read_char(&mut self) -> char {
415-
doc_as_u32(self.next_doc(EsChar)) as char
416-
}
398+
fn read_f64(&mut self) -> f64 { fail!("read_f64()"); }
399+
fn read_f32(&mut self) -> f32 { fail!("read_f32()"); }
400+
fn read_float(&mut self) -> float { fail!("read_float()"); }
401+
fn read_char(&mut self) -> char { fail!("read_char()"); }
417402
fn read_str(&mut self) -> ~str { doc_as_str(self.next_doc(EsStr)) }
418403

419404
// Compound types:
@@ -556,50 +541,66 @@ pub mod reader {
556541

557542
fn read_seq<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
558543
debug!("read_seq()");
559-
do self.push_doc(EsVec) |d| {
560-
let len = d._next_uint(EsVecLen);
561-
debug!(" len=%u", len);
562-
f(d, len)
563-
}
544+
let doc = self.next_doc(EsVec);
545+
546+
let (old_parent, old_pos) = (self.parent, self.pos);
547+
self.parent = doc;
548+
self.pos = self.parent.start;
549+
550+
let len = self._next_uint(EsVecLen);
551+
debug!(" len=%u", len);
552+
let result = f(self, len);
553+
554+
self.parent = old_parent;
555+
self.pos = old_pos;
556+
result
564557
}
565558

566559
fn read_seq_elt<T>(&mut self, idx: uint, f: &fn(&mut Decoder) -> T)
567560
-> T {
568561
debug!("read_seq_elt(idx=%u)", idx);
569-
self.push_doc(EsVecElt, f)
562+
let doc = self.next_doc(EsVecElt);
563+
564+
let (old_parent, old_pos) = (self.parent, self.pos);
565+
self.parent = doc;
566+
self.pos = self.parent.start;
567+
568+
let result = f(self);
569+
570+
self.parent = old_parent;
571+
self.pos = old_pos;
572+
result
570573
}
571574

572-
fn read_map<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
575+
fn read_map<T>(&mut self, _: &fn(&mut Decoder, uint) -> T) -> T {
573576
debug!("read_map()");
574-
do self.push_doc(EsMap) |d| {
575-
let len = d._next_uint(EsMapLen);
576-
debug!(" len=%u", len);
577-
f(d, len)
578-
}
577+
fail!("read_map is unimplemented");
579578
}
580579

581580
fn read_map_elt_key<T>(&mut self,
582581
idx: uint,
583-
f: &fn(&mut Decoder) -> T)
582+
_: &fn(&mut Decoder) -> T)
584583
-> T {
585584
debug!("read_map_elt_key(idx=%u)", idx);
586-
self.push_doc(EsMapKey, f)
585+
fail!("read_map_elt_val is unimplemented");
587586
}
588587

589588
fn read_map_elt_val<T>(&mut self,
590589
idx: uint,
591-
f: &fn(&mut Decoder) -> T)
590+
_: &fn(&mut Decoder) -> T)
592591
-> T {
593592
debug!("read_map_elt_val(idx=%u)", idx);
594-
self.push_doc(EsMapVal, f)
593+
fail!("read_map_elt_val is unimplemented");
595594
}
596595
}
597596
}
598597

599598
pub mod writer {
600-
use super::*;
599+
use ebml::{EbmlEncoderTag, EsBool, EsEnum, EsEnumBody, EsEnumVid};
600+
use ebml::{EsI16, EsI32, EsI64, EsI8, EsInt};
601+
use ebml::{EsLabel, EsOpaque, EsStr, EsU16, EsU32, EsU64, EsU8, EsUint};
602+
use ebml::{EsVec, EsVecElt, EsVecLen};
601603

602-
use core::cast;
603604
use core::io;
604605
use core::str;
605606

@@ -805,21 +806,19 @@ pub mod writer {
805806
self.wr_tagged_u8(EsBool as uint, v as u8)
806807
}
807808

808-
fn emit_f64(&mut self, v: f64) {
809-
let bits = unsafe { cast::transmute(v) };
810-
self.wr_tagged_u64(EsF64 as uint, bits);
809+
// FIXME (#2742): implement these
810+
fn emit_f64(&mut self, _v: f64) {
811+
fail!("Unimplemented: serializing an f64");
811812
}
812-
fn emit_f32(&mut self, v: f32) {
813-
let bits = unsafe { cast::transmute(v) };
814-
self.wr_tagged_u32(EsF32 as uint, bits);
813+
fn emit_f32(&mut self, _v: f32) {
814+
fail!("Unimplemented: serializing an f32");
815815
}
816-
fn emit_float(&mut self, v: float) {
817-
let bits = unsafe { cast::transmute(v as f64) };
818-
self.wr_tagged_u64(EsFloat as uint, bits);
816+
fn emit_float(&mut self, _v: float) {
817+
fail!("Unimplemented: serializing a float");
819818
}
820819

821-
fn emit_char(&mut self, v: char) {
822-
self.wr_tagged_u32(EsChar as uint, v as u32);
820+
fn emit_char(&mut self, _v: char) {
821+
fail!("Unimplemented: serializing a char");
823822
}
824823

825824
fn emit_str(&mut self, v: &str) {
@@ -915,23 +914,16 @@ pub mod writer {
915914
self.end_tag();
916915
}
917916

918-
fn emit_map(&mut self, len: uint, f: &fn(&mut Encoder)) {
919-
self.start_tag(EsMap as uint);
920-
self._emit_tagged_uint(EsMapLen, len);
921-
f(self);
922-
self.end_tag();
917+
fn emit_map(&mut self, _len: uint, _f: &fn(&mut Encoder)) {
918+
fail!("emit_map is unimplemented");
923919
}
924920

925-
fn emit_map_elt_key(&mut self, _idx: uint, f: &fn(&mut Encoder)) {
926-
self.start_tag(EsMapKey as uint);
927-
f(self);
928-
self.end_tag();
921+
fn emit_map_elt_key(&mut self, _idx: uint, _f: &fn(&mut Encoder)) {
922+
fail!("emit_map_elt_key is unimplemented");
929923
}
930924

931-
fn emit_map_elt_val(&mut self, _idx: uint, f: &fn(&mut Encoder)) {
932-
self.start_tag(EsMapVal as uint);
933-
f(self);
934-
self.end_tag();
925+
fn emit_map_elt_val(&mut self, _idx: uint, _f: &fn(&mut Encoder)) {
926+
fail!("emit_map_elt_val is unimplemented");
935927
}
936928
}
937929
}

0 commit comments

Comments
 (0)