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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 // to the same object requires fewer allocations and copies. | 2557 // to the same object requires fewer allocations and copies. |
2558 static const int kFieldsAdded = 3; | 2558 static const int kFieldsAdded = 3; |
2559 | 2559 |
2560 // Layout description. | 2560 // Layout description. |
2561 static const int kElementsOffset = JSReceiver::kHeaderSize; | 2561 static const int kElementsOffset = JSReceiver::kHeaderSize; |
2562 static const int kHeaderSize = kElementsOffset + kPointerSize; | 2562 static const int kHeaderSize = kElementsOffset + kPointerSize; |
2563 | 2563 |
2564 STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize); | 2564 STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize); |
2565 | 2565 |
2566 class BodyDescriptor; | 2566 class BodyDescriptor; |
| 2567 class FastBodyDescriptor; |
2567 | 2568 |
2568 // Gets the number of currently used elements. | 2569 // Gets the number of currently used elements. |
2569 int GetFastElementsUsage(); | 2570 int GetFastElementsUsage(); |
2570 | 2571 |
2571 static bool AllCanRead(LookupIterator* it); | 2572 static bool AllCanRead(LookupIterator* it); |
2572 static bool AllCanWrite(LookupIterator* it); | 2573 static bool AllCanWrite(LookupIterator* it); |
2573 | 2574 |
2574 private: | 2575 private: |
2575 friend class JSReceiver; | 2576 friend class JSReceiver; |
2576 friend class Object; | 2577 friend class Object; |
(...skipping 7667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10244 } | 10245 } |
10245 }; | 10246 }; |
10246 | 10247 |
10247 | 10248 |
10248 } // NOLINT, false-positive due to second-order macros. | 10249 } // NOLINT, false-positive due to second-order macros. |
10249 } // NOLINT, false-positive due to second-order macros. | 10250 } // NOLINT, false-positive due to second-order macros. |
10250 | 10251 |
10251 #include "src/objects/object-macros-undef.h" | 10252 #include "src/objects/object-macros-undef.h" |
10252 | 10253 |
10253 #endif // V8_OBJECTS_H_ | 10254 #endif // V8_OBJECTS_H_ |
OLD | NEW |