| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 10527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10538 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 10538 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
| 10539 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 10539 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
| 10540 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; | 10540 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; |
| 10541 static const int kAccessCheckInfoOffset = | 10541 static const int kAccessCheckInfoOffset = |
| 10542 kInstanceCallHandlerOffset + kPointerSize; | 10542 kInstanceCallHandlerOffset + kPointerSize; |
| 10543 static const int kFlagOffset = kAccessCheckInfoOffset + kPointerSize; | 10543 static const int kFlagOffset = kAccessCheckInfoOffset + kPointerSize; |
| 10544 static const int kLengthOffset = kFlagOffset + kPointerSize; | 10544 static const int kLengthOffset = kFlagOffset + kPointerSize; |
| 10545 static const int kSize = kLengthOffset + kPointerSize; | 10545 static const int kSize = kLengthOffset + kPointerSize; |
| 10546 | 10546 |
| 10547 // Returns true if |object| is an instance of this function template. | 10547 // Returns true if |object| is an instance of this function template. |
| 10548 bool IsTemplateFor(Object* object); | 10548 bool IsTemplateFor(JSObject* object); |
| 10549 bool IsTemplateFor(Map* map); | 10549 bool IsTemplateFor(Map* map); |
| 10550 | 10550 |
| 10551 // Returns the holder JSObject if the function can legally be called with this | |
| 10552 // receiver. Returns Heap::null_value() if the call is illegal. | |
| 10553 Object* GetCompatibleReceiver(Isolate* isolate, Object* receiver); | |
| 10554 | |
| 10555 private: | 10551 private: |
| 10556 // Bit position in the flag, from least significant bit position. | 10552 // Bit position in the flag, from least significant bit position. |
| 10557 static const int kHiddenPrototypeBit = 0; | 10553 static const int kHiddenPrototypeBit = 0; |
| 10558 static const int kUndetectableBit = 1; | 10554 static const int kUndetectableBit = 1; |
| 10559 static const int kNeedsAccessCheckBit = 2; | 10555 static const int kNeedsAccessCheckBit = 2; |
| 10560 static const int kReadOnlyPrototypeBit = 3; | 10556 static const int kReadOnlyPrototypeBit = 3; |
| 10561 static const int kRemovePrototypeBit = 4; | 10557 static const int kRemovePrototypeBit = 4; |
| 10562 static const int kDoNotCacheBit = 5; | 10558 static const int kDoNotCacheBit = 5; |
| 10563 static const int kInstantiatedBit = 6; | 10559 static const int kInstantiatedBit = 6; |
| 10564 static const int kAcceptAnyReceiver = 7; | 10560 static const int kAcceptAnyReceiver = 7; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10807 } | 10803 } |
| 10808 return value; | 10804 return value; |
| 10809 } | 10805 } |
| 10810 }; | 10806 }; |
| 10811 | 10807 |
| 10812 | 10808 |
| 10813 } // NOLINT, false-positive due to second-order macros. | 10809 } // NOLINT, false-positive due to second-order macros. |
| 10814 } // NOLINT, false-positive due to second-order macros. | 10810 } // NOLINT, false-positive due to second-order macros. |
| 10815 | 10811 |
| 10816 #endif // V8_OBJECTS_H_ | 10812 #endif // V8_OBJECTS_H_ |
| OLD | NEW |