Commit 1af49b85 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[runtime] Remove unnecessary instance types

LAST_FUNCTION_TYPE, FIRST_FUNCTION_TYPE are no longer necessary.

TBR: tebbi@chromium.org
Bug: v8:11256
Change-Id: I37b1396eca8f89a287e04f2ef6b642dad248ae67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2599745
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71852}
parent 20703d7f
......@@ -2615,8 +2615,8 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) {
// Check for consistency among the {receiver_maps}.
if (!receiver_map.prototype().equals(prototype) ||
receiver_map.is_constructor() != is_constructor ||
!base::IsInRange(receiver_map.instance_type(), FIRST_FUNCTION_TYPE,
LAST_FUNCTION_TYPE)) {
!InstanceTypeChecker::IsJSFunctionOrBoundFunction(
receiver_map.instance_type())) {
return inference.NoChange();
}
......
......@@ -143,8 +143,6 @@ enum InstanceType : uint16_t {
// Convenient names for things where the generated name is awkward:
FIRST_TYPE = FIRST_HEAP_OBJECT_TYPE,
LAST_TYPE = LAST_HEAP_OBJECT_TYPE,
FIRST_FUNCTION_TYPE = FIRST_JS_FUNCTION_OR_BOUND_FUNCTION_TYPE,
LAST_FUNCTION_TYPE = LAST_JS_FUNCTION_OR_BOUND_FUNCTION_TYPE,
BIGINT_TYPE = BIG_INT_BASE_TYPE,
};
......
......@@ -154,8 +154,7 @@ DEF_GETTER(HeapObject, IsUniqueName, bool) {
}
DEF_GETTER(HeapObject, IsFunction, bool) {
return base::IsInRange(map(isolate).instance_type(), FIRST_FUNCTION_TYPE,
LAST_FUNCTION_TYPE);
return IsJSFunctionOrBoundFunction();
}
DEF_GETTER(HeapObject, IsCallable, bool) { return map(isolate).is_callable(); }
......
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