Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 2efd7ef6597a5e9cb174a9a2301eb6898a3ec28d..4aa0ea18b56950802b79c2c1c82f2a5091b28fa6 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -189,12 +189,6 @@ |
bool Object::IsCallable() const { |
return Object::IsHeapObject() && HeapObject::cast(this)->map()->is_callable(); |
-} |
- |
- |
-bool Object::IsConstructor() const { |
- return Object::IsHeapObject() && |
- HeapObject::cast(this)->map()->is_constructor(); |
} |
@@ -4538,17 +4532,13 @@ |
} |
-void Map::set_is_constructor(bool value) { |
- if (value) { |
- set_bit_field(bit_field() | (1 << kIsConstructor)); |
- } else { |
- set_bit_field(bit_field() & ~(1 << kIsConstructor)); |
- } |
-} |
- |
- |
-bool Map::is_constructor() const { |
- return ((1 << kIsConstructor) & bit_field()) != 0; |
+void Map::set_function_with_prototype(bool value) { |
+ set_bit_field(FunctionWithPrototype::update(bit_field(), value)); |
+} |
+ |
+ |
+bool Map::function_with_prototype() { |
+ return FunctionWithPrototype::decode(bit_field()); |
} |
@@ -4805,7 +4795,6 @@ |
return instance_type() >= FIRST_JS_OBJECT_TYPE; |
} |
bool Map::IsJSArrayMap() { return instance_type() == JS_ARRAY_TYPE; } |
-bool Map::IsJSFunctionMap() { return instance_type() == JS_FUNCTION_TYPE; } |
bool Map::IsStringMap() { return instance_type() < FIRST_NONSTRING_TYPE; } |
bool Map::IsJSProxyMap() { |
InstanceType type = instance_type(); |
@@ -6264,6 +6253,11 @@ |
return prototype; |
} |
return instance_prototype(); |
+} |
+ |
+ |
+bool JSFunction::should_have_prototype() { |
+ return map()->function_with_prototype(); |
} |