Skip to content

Commit

Permalink
Mass rename anyref to externref
Browse files Browse the repository at this point in the history
Updates a mess of dependencies and tracks the most recent version of the
reference types specification.
  • Loading branch information
alexcrichton committed May 18, 2020
1 parent 61e8fc0 commit 172c602
Show file tree
Hide file tree
Showing 64 changed files with 610 additions and 618 deletions.
2 changes: 1 addition & 1 deletion crates/backend/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ impl ToTokens for ast::ImportType {
let typescript_type_chars = typescript_type.chars().map(|c| c as u32);
quote! {
use wasm_bindgen::describe::*;
inform(NAMED_ANYREF);
inform(NAMED_EXTERNREF);
inform(#typescript_type_len);
#(inform(#typescript_type_chars);)*
}
Expand Down
10 changes: 5 additions & 5 deletions crates/cli-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ log = "0.4"
rustc-demangle = "0.1.13"
serde_json = "1.0"
tempfile = "3.0"
walrus = "0.16.1"
wasm-bindgen-anyref-xform = { path = '../anyref-xform', version = '=0.2.62' }
walrus = "0.17.0"
wasm-bindgen-externref-xform = { path = '../externref-xform', version = '=0.2.62' }
wasm-bindgen-multi-value-xform = { path = '../multi-value-xform', version = '=0.2.62' }
wasm-bindgen-shared = { path = "../shared", version = '=0.2.62' }
wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.62' }
wasm-bindgen-wasm-conventions = { path = '../wasm-conventions', version = '=0.2.62' }
wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.62' }
wit-text = "0.6.0"
wit-walrus = "0.2.0"
wit-validator = "0.1.0"
wit-text = "0.7.0"
wit-walrus = "0.4.0"
wit-validator = "0.2.0"
22 changes: 11 additions & 11 deletions crates/cli-support/src/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ tys! {
REFMUT
SLICE
VECTOR
ANYREF
NAMED_ANYREF
EXTERNREF
NAMED_EXTERNREF
ENUM
RUST_STRUCT
CHAR
Expand Down Expand Up @@ -62,8 +62,8 @@ pub enum Descriptor {
Vector(Box<Descriptor>),
CachedString,
String,
Anyref,
NamedAnyref(String),
Externref,
NamedExternref(String),
Enum { hole: u32 },
RustStruct(String),
Char,
Expand Down Expand Up @@ -100,7 +100,7 @@ pub enum VectorKind {
F32,
F64,
String,
Anyref,
Externref,
}

impl Descriptor {
Expand Down Expand Up @@ -133,15 +133,15 @@ impl Descriptor {
OPTIONAL => Descriptor::Option(Box::new(Descriptor::_decode(data, clamped))),
CACHED_STRING => Descriptor::CachedString,
STRING => Descriptor::String,
ANYREF => Descriptor::Anyref,
EXTERNREF => Descriptor::Externref,
ENUM => Descriptor::Enum { hole: get(data) },
RUST_STRUCT => {
let name = get_string(data);
Descriptor::RustStruct(name)
}
NAMED_ANYREF => {
NAMED_EXTERNREF => {
let name = get_string(data);
Descriptor::NamedAnyref(name)
Descriptor::NamedExternref(name)
}
CHAR => Descriptor::Char,
UNIT => Descriptor::Unit,
Expand Down Expand Up @@ -192,7 +192,7 @@ impl Descriptor {
Descriptor::U64 => Some(VectorKind::U64),
Descriptor::F32 => Some(VectorKind::F32),
Descriptor::F64 => Some(VectorKind::F64),
Descriptor::Anyref => Some(VectorKind::Anyref),
Descriptor::Externref => Some(VectorKind::Externref),
_ => None,
}
}
Expand Down Expand Up @@ -254,7 +254,7 @@ impl VectorKind {
VectorKind::U64 => "BigUint64Array",
VectorKind::F32 => "Float32Array",
VectorKind::F64 => "Float64Array",
VectorKind::Anyref => "any[]",
VectorKind::Externref => "any[]",
}
}

Expand All @@ -272,7 +272,7 @@ impl VectorKind {
VectorKind::U64 => 8,
VectorKind::F32 => 4,
VectorKind::F64 => 8,
VectorKind::Anyref => 4,
VectorKind::Externref => 4,
}
}
}
Loading

0 comments on commit 172c602

Please sign in to comment.