| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index f5f2eaeaad93e3d8960771a902afd80aa111bdad..3b637c4147c3f7eff1efc10fbd804fe0c9f44ca0 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -187,12 +187,18 @@ bool Object::IsUniqueName() const {
|
| }
|
|
|
|
|
| +bool Object::IsCallable() const {
|
| + return Object::IsHeapObject() && HeapObject::cast(this)->map()->is_callable();
|
| +}
|
| +
|
| +
|
| bool Object::IsSpecObject() const {
|
| return Object::IsHeapObject()
|
| && HeapObject::cast(this)->map()->instance_type() >= FIRST_SPEC_OBJECT_TYPE;
|
| }
|
|
|
|
|
| +// TODO(rossberg): Remove this and use the spec compliant IsCallable instead.
|
| bool Object::IsSpecFunction() const {
|
| if (!Object::IsHeapObject()) return false;
|
| InstanceType type = HeapObject::cast(this)->map()->instance_type();
|
| @@ -4482,12 +4488,12 @@ bool Map::function_with_prototype() {
|
|
|
|
|
| void Map::set_is_hidden_prototype() {
|
| - set_bit_field(bit_field() | (1 << kIsHiddenPrototype));
|
| + set_bit_field3(IsHiddenPrototype::update(bit_field3(), true));
|
| }
|
|
|
|
|
| -bool Map::is_hidden_prototype() {
|
| - return ((1 << kIsHiddenPrototype) & bit_field()) != 0;
|
| +bool Map::is_hidden_prototype() const {
|
| + return IsHiddenPrototype::decode(bit_field3());
|
| }
|
|
|
|
|
| @@ -4633,13 +4639,11 @@ bool Map::owns_descriptors() {
|
| }
|
|
|
|
|
| -void Map::set_has_instance_call_handler() {
|
| - set_bit_field3(HasInstanceCallHandler::update(bit_field3(), true));
|
| -}
|
| +void Map::set_is_callable() { set_bit_field(bit_field() | (1 << kIsCallable)); }
|
|
|
|
|
| -bool Map::has_instance_call_handler() {
|
| - return HasInstanceCallHandler::decode(bit_field3());
|
| +bool Map::is_callable() const {
|
| + return ((1 << kIsCallable) & bit_field()) != 0;
|
| }
|
|
|
|
|
| @@ -6265,7 +6269,7 @@ void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id,
|
|
|
| ACCESSORS(JSProxy, handler, Object, kHandlerOffset)
|
| ACCESSORS(JSProxy, hash, Object, kHashOffset)
|
| -ACCESSORS(JSFunctionProxy, call_trap, Object, kCallTrapOffset)
|
| +ACCESSORS(JSFunctionProxy, call_trap, JSReceiver, kCallTrapOffset)
|
| ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset)
|
|
|
|
|
|
|