From f6d4329be7e05dd9e6a23dbbc8d0781e3f4573f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Fl=C3=BCckiger?= Date: Mon, 6 Feb 2023 18:10:54 +0100 Subject: [PATCH] [static-roots] Enable instance type to static map mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conversion was accidentially disabled by a trailing backslash. Bug: v8:13466 Change-Id: I0e1d162afff3bb9d22ac17a98b0b4ffde51a5ca2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4224465 Reviewed-by: Jakob Linke Commit-Queue: Olivier Flückiger Cr-Commit-Position: refs/heads/main@{#85706} --- src/objects/instance-type-inl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/objects/instance-type-inl.h b/src/objects/instance-type-inl.h index 2a15175eb5..4bae7442e3 100644 --- a/src/objects/instance-type-inl.h +++ b/src/objects/instance-type-inl.h @@ -52,16 +52,13 @@ UNIQUE_INSTANCE_TYPE_MAP_LIST_GENERATOR(INSTANCE_TYPE_MAP, _) inline constexpr base::Optional UniqueMapOfInstanceType( InstanceType type) { - switch (type) { #define INSTANCE_TYPE_CHECK(it, forinstancetype) \ - case forinstancetype: \ + if (type == forinstancetype) { \ return InstanceTypeChecker::UniqueMapOfInstanceType< \ InstanceTypeChecker::InstanceTypeTraits::it>(); \ - INSTANCE_TYPE_CHECKERS_SINGLE(INSTANCE_TYPE_CHECK); -#undef INSTANCE_TYPE_CHECK - default: { - } } + INSTANCE_TYPE_CHECKERS_SINGLE(INSTANCE_TYPE_CHECK); +#undef INSTANCE_TYPE_CHECK return {}; }