Commit e5ffe90f authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[wasm] Switch back to boolean enums

This reverts https://crrev.com/c/3778717, and also switches "Promise"
to a boolean enum.
The underlying clang crash is fixed, see linked issue.

R=thibaudm@chromium.org

Bug: chromium:1344641
Change-Id: I7fac50eb4f1155aca1c101f01892df78cdde46e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823128Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82348}
parent 532ca599
...@@ -54,7 +54,7 @@ class WasmCode; ...@@ -54,7 +54,7 @@ class WasmCode;
class WasmFeatures; class WasmFeatures;
class WireBytesStorage; class WireBytesStorage;
enum class LoadTransformationKind : uint8_t; enum class LoadTransformationKind : uint8_t;
enum Suspend : uint8_t; enum Suspend : bool;
} // namespace wasm } // namespace wasm
namespace compiler { namespace compiler {
......
...@@ -83,8 +83,8 @@ class StructType; ...@@ -83,8 +83,8 @@ class StructType;
struct WasmElemSegment; struct WasmElemSegment;
class WasmValue; class WasmValue;
enum class OnResume : int; enum class OnResume : int;
enum Suspend : uint8_t; enum Suspend : bool;
enum Promise : uint8_t; enum Promise : bool;
} // namespace wasm } // namespace wasm
#endif #endif
......
...@@ -76,11 +76,8 @@ class V8_EXPORT_PRIVATE FunctionTargetAndRef { ...@@ -76,11 +76,8 @@ class V8_EXPORT_PRIVATE FunctionTargetAndRef {
}; };
namespace wasm { namespace wasm {
// TODO(thibaudm): Use a bool instead when this is resolved: enum Suspend : bool { kSuspend = true, kNoSuspend = false };
// https://github.com/llvm/llvm-project/issues/56560. See also enum Promise : bool { kPromise = true, kNoPromise = false };
// crbug.com/1344641.
enum Suspend : uint8_t { kSuspend = 1, kNoSuspend = 0 };
enum Promise : uint8_t { kPromise = 1, kNoPromise = 0 };
enum class OnResume : int { kContinue, kThrow }; enum class OnResume : int { kContinue, kThrow };
} // namespace wasm } // namespace wasm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment