5 #ifndef V8_WASM_WASM_FEATURES_H_ 6 #define V8_WASM_WASM_FEATURES_H_ 9 #include "src/base/macros.h" 10 #include "src/wasm/wasm-feature-flags.h" 13 #define FOREACH_WASM_FEATURE FOREACH_WASM_FEATURE_FLAG 22 #define DECL_FIELD(feat, desc, val) bool feat = false; 23 #define JUST_TRUE(feat, desc, val) true 24 #define JUST_FALSE(feat, desc, val) false 25 #define DECL_PARAM(feat, desc, val) bool p##feat 26 #define DO_INIT(feat, desc, val) feat(p##feat) 30 FOREACH_WASM_FEATURE(DECL_FIELD, SPACE)
34 explicit constexpr
WasmFeatures(FOREACH_WASM_FEATURE(DECL_PARAM, COMMA))
35 : FOREACH_WASM_FEATURE(DO_INIT, COMMA) {}
39 FOREACH_WASM_FEATURE(JUST_TRUE, COMMA)};
41 static constexpr WasmFeatures kNoWasmFeatures{
42 FOREACH_WASM_FEATURE(JUST_FALSE, COMMA)};
52 static constexpr WasmFeatures kAsmjsWasmFeatures = kNoWasmFeatures;
54 V8_EXPORT_PRIVATE WasmFeatures WasmFeaturesFromFlags();
58 V8_EXPORT_PRIVATE WasmFeatures WasmFeaturesFromIsolate(Isolate* isolate);
60 V8_EXPORT_PRIVATE
void UnionFeaturesInto(WasmFeatures* dst,
61 const WasmFeatures& src);
67 #endif // V8_WASM_WASM_FEATURES_H_