5 #include "src/wasm/wasm-features.h" 7 #include "src/handles-inl.h" 8 #include "src/isolate.h" 16 #define DO_UNION(feat, desc, val) dst->feat |= src.feat; 17 #define FLAG_REF(feat, desc, val) FLAG_experimental_wasm_##feat 19 void UnionFeaturesInto(WasmFeatures* dst,
const WasmFeatures& src) {
20 FOREACH_WASM_FEATURE(DO_UNION, SPACE);
23 WasmFeatures WasmFeaturesFromFlags() {
24 return WasmFeatures{FOREACH_WASM_FEATURE(FLAG_REF, COMMA)};
27 WasmFeatures WasmFeaturesFromIsolate(Isolate* isolate) {
28 WasmFeatures features = WasmFeaturesFromFlags();
30 isolate->AreWasmThreadsEnabled(handle(isolate->context(), isolate));