Index: src/ic/ic-inl.h |
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h |
index 626748a804f2007242cf44ad94c85b39df200228..d6802b67d0903a0ccd4f4cc2253b6d86ae9bf9b6 100644 |
--- a/src/ic/ic-inl.h |
+++ b/src/ic/ic-inl.h |
@@ -130,29 +130,23 @@ JSFunction* IC::GetRootConstructor(Map* receiver_map, Context* native_context) { |
Isolate* isolate = receiver_map->GetIsolate(); |
if (receiver_map == isolate->heap()->boolean_map()) { |
return native_context->boolean_function(); |
- } else if (receiver_map->instance_type() == HEAP_NUMBER_TYPE) { |
+ } |
+ if (receiver_map->instance_type() == HEAP_NUMBER_TYPE) { |
return native_context->number_function(); |
- } else if (receiver_map->instance_type() < FIRST_NONSTRING_TYPE) { |
+ } |
+ if (receiver_map->instance_type() < FIRST_NONSTRING_TYPE) { |
return native_context->string_function(); |
- } else if (receiver_map->instance_type() == SYMBOL_TYPE) { |
+ } |
+ if (receiver_map->instance_type() == SYMBOL_TYPE) { |
return native_context->symbol_function(); |
- } else if (receiver_map->instance_type() == FLOAT32X4_TYPE) { |
- return native_context->float32x4_function(); |
- } else if (receiver_map->instance_type() == INT32X4_TYPE) { |
- return native_context->int32x4_function(); |
- } else if (receiver_map->instance_type() == BOOL32X4_TYPE) { |
- return native_context->bool32x4_function(); |
- } else if (receiver_map->instance_type() == INT16X8_TYPE) { |
- return native_context->int16x8_function(); |
- } else if (receiver_map->instance_type() == BOOL16X8_TYPE) { |
- return native_context->bool16x8_function(); |
- } else if (receiver_map->instance_type() == INT8X16_TYPE) { |
- return native_context->int8x16_function(); |
- } else if (receiver_map->instance_type() == BOOL8X16_TYPE) { |
- return native_context->bool8x16_function(); |
- } else { |
- return NULL; |
} |
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
+ if (receiver_map == isolate->heap()->type##_map()) { \ |
+ return native_context->type##_function(); \ |
+ } |
+ SIMD128_TYPES(SIMD128_TYPE) |
+#undef SIMD128_TYPE |
+ return nullptr; |
} |