Group cases with the same return value

Change-Id: Ide57fbbe30c2d2f04c42af09784eb8fc4c8a52f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3761974
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Cr-Commit-Position: refs/heads/main@{#81715}
This commit is contained in:
JianxiaoLuIntel 2022-07-14 14:04:28 +08:00 committed by V8 LUCI CQ
parent ae56aa0a21
commit ceb06244f2

View File

@ -2378,6 +2378,9 @@ int JSObject::GetHeaderSize(InstanceType type,
case JS_STRING_ITERATOR_PROTOTYPE_TYPE: case JS_STRING_ITERATOR_PROTOTYPE_TYPE:
case JS_ARRAY_ITERATOR_PROTOTYPE_TYPE: case JS_ARRAY_ITERATOR_PROTOTYPE_TYPE:
case JS_TYPED_ARRAY_PROTOTYPE_TYPE: case JS_TYPED_ARRAY_PROTOTYPE_TYPE:
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
case JS_ARGUMENTS_OBJECT_TYPE:
case JS_ERROR_TYPE:
return JSObject::kHeaderSize; return JSObject::kHeaderSize;
case JS_GENERATOR_OBJECT_TYPE: case JS_GENERATOR_OBJECT_TYPE:
return JSGeneratorObject::kHeaderSize; return JSGeneratorObject::kHeaderSize;
@ -2442,14 +2445,8 @@ int JSObject::GetHeaderSize(InstanceType type,
return JSRegExp::kHeaderSize; return JSRegExp::kHeaderSize;
case JS_REG_EXP_STRING_ITERATOR_TYPE: case JS_REG_EXP_STRING_ITERATOR_TYPE:
return JSRegExpStringIterator::kHeaderSize; return JSRegExpStringIterator::kHeaderSize;
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
return JSObject::kHeaderSize;
case JS_MESSAGE_OBJECT_TYPE: case JS_MESSAGE_OBJECT_TYPE:
return JSMessageObject::kHeaderSize; return JSMessageObject::kHeaderSize;
case JS_ARGUMENTS_OBJECT_TYPE:
return JSObject::kHeaderSize;
case JS_ERROR_TYPE:
return JSObject::kHeaderSize;
case JS_EXTERNAL_OBJECT_TYPE: case JS_EXTERNAL_OBJECT_TYPE:
return JSExternalObject::kHeaderSize; return JSExternalObject::kHeaderSize;
case JS_SHADOW_REALM_TYPE: case JS_SHADOW_REALM_TYPE: