diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/fuzzing/fuzzing.cpp | 28 | ||||
-rw-r--r-- | src/tools/fuzzing/heap-types.cpp | 6 | ||||
-rw-r--r-- | src/tools/spec-wrapper.h | 3 | ||||
-rw-r--r-- | src/tools/wasm-reduce.cpp | 5 |
4 files changed, 4 insertions, 38 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 467d7f724..8721753a1 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -32,7 +32,7 @@ TranslateToFuzzReader::TranslateToFuzzReader(Module& wasm, : wasm(wasm), builder(wasm), random(std::move(input), wasm.features) { // - funcref cannot be logged because referenced functions can be inlined or // removed during optimization - // - there's no point in logging externref or anyref because these are opaque + // - there's no point in logging anyref because it is opaque // - don't bother logging tuples loggableTypes = {Type::i32, Type::i64, Type::f32, Type::f64}; if (wasm.features.hasSIMD()) { @@ -1460,7 +1460,6 @@ Expression* TranslateToFuzzReader::makeNonAtomicLoad(Type type) { 16, false, offset, pick(1, 2, 4, 8, 16), ptr, type); } case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1564,7 +1563,6 @@ Expression* TranslateToFuzzReader::makeNonAtomicStore(Type type) { 16, offset, pick(1, 2, 4, 8, 16), ptr, value, type); } case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1700,7 +1698,6 @@ Literal TranslateToFuzzReader::makeLiteral(Type type) { return Literal(getDouble()); case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1747,7 +1744,6 @@ Literal TranslateToFuzzReader::makeLiteral(Type type) { return Literal(double(small)); case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1817,7 +1813,6 @@ Literal TranslateToFuzzReader::makeLiteral(Type type) { break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1846,7 +1841,6 @@ Literal TranslateToFuzzReader::makeLiteral(Type type) { break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -1919,9 +1913,6 @@ Expression* TranslateToFuzzReader::makeConst(Type type) { switch (heapType.getBasic()) { case HeapType::func: return makeRefFuncConst(type); - case HeapType::ext: - // No trivial way to create an externref. - break; case HeapType::any: { // Choose a subtype we can materialize a constant for. We cannot // materialize non-nullable refs to func or i31 in global contexts. @@ -2067,7 +2058,6 @@ Expression* TranslateToFuzzReader::makeUnary(Type type) { make(Type::v128)}); } case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -2208,7 +2198,6 @@ Expression* TranslateToFuzzReader::makeUnary(Type type) { WASM_UNREACHABLE("invalid value"); } case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -2447,7 +2436,6 @@ Expression* TranslateToFuzzReader::makeBinary(Type type) { make(Type::v128)}); } case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -2655,7 +2643,6 @@ Expression* TranslateToFuzzReader::makeSIMDExtract(Type type) { break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -2913,12 +2900,10 @@ Type TranslateToFuzzReader::getSingleConcreteType() { WeightedOption{Type::f32, VeryImportant}, WeightedOption{Type::f64, VeryImportant}) .add(FeatureSet::SIMD, WeightedOption{Type::v128, Important}) - .add(FeatureSet::ReferenceTypes, Type::funcref, Type::externref) + .add(FeatureSet::ReferenceTypes, Type::funcref, Type::anyref) .add(FeatureSet::ReferenceTypes | FeatureSet::GC, // Type(HeapType::func, NonNullable), - // Type(HeapType::ext, NonNullable), - Type(HeapType::any, Nullable), - Type(HeapType::any, NonNullable), + // Type(HeapType::any, NonNullable), Type(HeapType::eq, Nullable), Type(HeapType::eq, NonNullable), Type(HeapType::i31, Nullable), @@ -2929,11 +2914,9 @@ Type TranslateToFuzzReader::getSingleConcreteType() { Type TranslateToFuzzReader::getReferenceType() { return pick(FeatureOptions<Type>() - .add(FeatureSet::ReferenceTypes, Type::funcref, Type::externref) + .add(FeatureSet::ReferenceTypes, Type::funcref, Type::anyref) .add(FeatureSet::ReferenceTypes | FeatureSet::GC, Type(HeapType::func, NonNullable), - Type(HeapType::ext, NonNullable), - Type(HeapType::any, Nullable), Type(HeapType::any, NonNullable), Type(HeapType::eq, Nullable), Type(HeapType::eq, NonNullable), @@ -3016,12 +2999,9 @@ HeapType TranslateToFuzzReader::getSubType(HeapType type) { case HeapType::func: // TODO: Typed function references. return HeapType::func; - case HeapType::ext: - return HeapType::ext; case HeapType::any: // TODO: nontrivial types as well. return pick(HeapType::func, - HeapType::ext, HeapType::any, HeapType::eq, HeapType::i31, diff --git a/src/tools/fuzzing/heap-types.cpp b/src/tools/fuzzing/heap-types.cpp index e918aa8b5..2e96087d7 100644 --- a/src/tools/fuzzing/heap-types.cpp +++ b/src/tools/fuzzing/heap-types.cpp @@ -153,7 +153,6 @@ struct HeapTypeGeneratorImpl { HeapType::BasicHeapType generateBasicHeapType() { return rand.pick(HeapType::func, - HeapType::ext, HeapType::any, HeapType::eq, HeapType::i31, @@ -167,7 +166,6 @@ struct HeapTypeGeneratorImpl { .add(FeatureSet::SIMD, Type::v128) .add(FeatureSet::ReferenceTypes | FeatureSet::GC, Type::funcref, - Type::externref, Type::anyref, Type::eqref, Type::i31ref, @@ -294,7 +292,6 @@ struct HeapTypeGeneratorImpl { return type; } else { switch (type) { - case HeapType::ext: case HeapType::i31: // No other subtypes. return type; @@ -385,8 +382,6 @@ struct HeapTypeGeneratorImpl { switch (type.getBasic()) { case HeapType::func: return pickSubFunc(); - case HeapType::ext: - return HeapType::ext; case HeapType::any: return pickSubAny(); case HeapType::eq: @@ -496,7 +491,6 @@ struct HeapTypeGeneratorImpl { switch (*basic) { case HeapType::func: return SignatureKind{}; - case HeapType::ext: case HeapType::i31: return super; case HeapType::any: diff --git a/src/tools/spec-wrapper.h b/src/tools/spec-wrapper.h index 3a490c954..43c0e9353 100644 --- a/src/tools/spec-wrapper.h +++ b/src/tools/spec-wrapper.h @@ -55,9 +55,6 @@ inline std::string generateSpecWrapper(Module& wasm) { case Type::funcref: ret += "(ref.null func)"; break; - case Type::externref: - ret += "(ref.null extern)"; - break; case Type::anyref: ret += "(ref.null any)"; break; diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 4d7b8f494..c6f9be0de 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -628,7 +628,6 @@ struct Reducer break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -656,7 +655,6 @@ struct Reducer break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -684,7 +682,6 @@ struct Reducer break; case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -712,7 +709,6 @@ struct Reducer WASM_UNREACHABLE("unexpected type"); case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: @@ -726,7 +722,6 @@ struct Reducer } case Type::v128: case Type::funcref: - case Type::externref: case Type::anyref: case Type::eqref: case Type::i31ref: |