1 // Copyright 2018 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_WASM_WASM_FEATURE_FLAGS_H_ 6 #define V8_WASM_WASM_FEATURE_FLAGS_H_ 7 8 // See https://github.com/WebAssembly/proposals for an overview of current 9 // WebAssembly proposals. 10 11 // Experimental features (disabled by default). 12 #define FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(V) /* (force 80 columns) */ \ 13 /* Exception handling proposal. */ \ 14 /* https://github.com/WebAssembly/exception-handling */ \ 15 /* V8 side owner: clemensb */ \ 16 V(eh, "exception handling opcodes", false) \ 17 \ 18 /* No official proposal (yet?). */ \ 19 /* V8 side owner: clemensb */ \ 20 V(compilation_hints, "compilation hints section", false) \ 21 \ 22 /* GC proposal (early prototype, might change dramatically) */ \ 23 /* Official proposal: https://github.com/WebAssembly/gc */ \ 24 /* Prototype engineering spec: https://bit.ly/3cWcm6Q */ \ 25 /* V8 side owner: jkummerow */ \ 26 V(gc, "garbage collection", false) \ 27 \ 28 /* Typed function references proposal. */ \ 29 /* Official proposal: https://github.com/WebAssembly/function-references */ \ 30 /* V8 side owner: ahaas */ \ 31 V(typed_funcref, "typed function references", false) \ 32 \ 33 /* Memory64 proposal. */ \ 34 /* https://github.com/WebAssembly/memory64 */ \ 35 /* V8 side owner: clemensb */ \ 36 V(memory64, "memory64", false) 37 38 // ############################################################################# 39 // Staged features (disabled by default, but enabled via --wasm-staging (also 40 // exposed as chrome://flags/#enable-experimental-webassembly-features). Staged 41 // features get limited fuzzer coverage, and should come with their own tests. 42 // They are not run through all fuzzers though and don't get much exposure in 43 // the wild. Staged features do not necessarily be fully stabilized. They should 44 // be shipped with enough lead time to the next branch to allow for 45 // stabilization. 46 #define FOREACH_WASM_STAGING_FEATURE_FLAG(V) /* (force 80 columns) */ \ 47 /* Reference Types, a.k.a. reftypes proposal. */ \ 48 /* https://github.com/WebAssembly/reference-types */ \ 49 /* V8 side owner: ahaas */ \ 50 /* Staged in v7.8. */ \ 51 V(reftypes, "reference type opcodes", false) \ 52 \ 53 /* Tail call / return call proposal. */ \ 54 /* https://github.com/webassembly/tail-call */ \ 55 /* V8 side owner: thibaudm */ \ 56 /* Staged in v8.7 * */ \ 57 V(return_call, "return call opcodes", false) \ 58 \ 59 /* Fixed-width SIMD operations. */ \ 60 /* https://github.com/webassembly/simd */ \ 61 /* V8 side owner: gdeepti, zhin */ \ 62 /* Staged in v8.7 * */ \ 63 V(simd, "SIMD opcodes", false) \ 64 \ 65 /* Threads proposal. */ \ 66 /* https://github.com/webassembly/threads */ \ 67 /* NOTE: This is enabled via chromium flag on desktop systems since v7.4 */ \ 68 /* (see https://crrev.com/c/1487808). ITS: https://groups.google.com/a/ */ \ 69 /* chromium.org/d/msg/blink-dev/tD6np-OG2PU/rcNGROOMFQAJ */ \ 70 /* V8 side owner: gdeepti */ \ 71 V(threads, "thread opcodes", false) \ 72 \ 73 /* Type reflection proposal. */ \ 74 /* https://github.com/webassembly/js-types */ \ 75 /* V8 side owner: ahaas */ \ 76 /* Staged in v7.8. */ \ 77 V(type_reflection, "wasm type reflection in JS", false) 78 79 // ############################################################################# 80 // Shipped features (enabled by default). Remove the feature flag once they hit 81 // stable and are expected to stay enabled. 82 #define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) /* (force 80 columns) */ \ 83 /* JS BigInt to wasm i64 integration. */ \ 84 /* https://github.com/WebAssembly/JS-BigInt-integration */ \ 85 /* V8 side owner: ahaas, ssauleau@igalia.com */ \ 86 /* Shipped in v8.5. */ \ 87 /* ITS: https://groups.google.com/a/chromium.org/g/blink-dev/c/ */ \ 88 /* g4QKRUQV1-0/m/jdWjD1uZAAAJ */ \ 89 V(bigint, "JS BigInt support", true) \ 90 \ 91 /* Bulk memory operations. */ \ 92 /* https://github.com/webassembly/bulk-memory-operations */ \ 93 /* V8 side owner: binji */ \ 94 /* Shipped in v7.5. */ \ 95 /* ITS: https://groups.google.com/forum/#!topic/v8-users/zM05lYEBVog */ \ 96 V(bulk_memory, "bulk memory opcodes", true) \ 97 \ 98 /* Multi-value proposal. */ \ 99 /* https://github.com/WebAssembly/multi-value */ \ 100 /* V8 side owner: thibaudm */ \ 101 /* Shipped in v8.6. */ \ 102 /* ITS: https://groups.google.com/g/v8-users/c/pv2E4yFWeF0 */ \ 103 V(mv, "multi-value support", true) 104 105 // Combination of all available wasm feature flags. 106 #define FOREACH_WASM_FEATURE_FLAG(V) \ 107 FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(V) \ 108 FOREACH_WASM_STAGING_FEATURE_FLAG(V) \ 109 FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) 110 111 #endif // V8_WASM_WASM_FEATURE_FLAGS_H_ 112