| 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 V(Code) \ | 955 V(Code) \ |
| 956 V(AbstractCode) \ | 956 V(AbstractCode) \ |
| 957 V(Oddball) \ | 957 V(Oddball) \ |
| 958 V(SharedFunctionInfo) \ | 958 V(SharedFunctionInfo) \ |
| 959 V(JSValue) \ | 959 V(JSValue) \ |
| 960 V(JSDate) \ | 960 V(JSDate) \ |
| 961 V(JSMessageObject) \ | 961 V(JSMessageObject) \ |
| 962 V(StringWrapper) \ | 962 V(StringWrapper) \ |
| 963 V(Foreign) \ | 963 V(Foreign) \ |
| 964 V(Boolean) \ | 964 V(Boolean) \ |
| 965 V(JSArgumentsObject) \ |
| 965 V(JSArray) \ | 966 V(JSArray) \ |
| 966 V(JSArrayBuffer) \ | 967 V(JSArrayBuffer) \ |
| 967 V(JSArrayBufferView) \ | 968 V(JSArrayBufferView) \ |
| 968 V(JSTypedArray) \ | 969 V(JSTypedArray) \ |
| 969 V(JSDataView) \ | 970 V(JSDataView) \ |
| 970 V(JSProxy) \ | 971 V(JSProxy) \ |
| 971 V(JSError) \ | 972 V(JSError) \ |
| 972 V(JSPromise) \ | 973 V(JSPromise) \ |
| 973 V(JSSet) \ | 974 V(JSSet) \ |
| 974 V(JSMap) \ | 975 V(JSMap) \ |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2577 | 2578 |
| 2578 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject. | 2579 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject. |
| 2579 class JSArgumentsObject: public JSObject { | 2580 class JSArgumentsObject: public JSObject { |
| 2580 public: | 2581 public: |
| 2581 // Offsets of object fields. | 2582 // Offsets of object fields. |
| 2582 static const int kLengthOffset = JSObject::kHeaderSize; | 2583 static const int kLengthOffset = JSObject::kHeaderSize; |
| 2583 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2584 static const int kHeaderSize = kLengthOffset + kPointerSize; |
| 2584 // Indices of in-object properties. | 2585 // Indices of in-object properties. |
| 2585 static const int kLengthIndex = 0; | 2586 static const int kLengthIndex = 0; |
| 2586 | 2587 |
| 2588 DECLARE_VERIFIER(JSArgumentsObject) |
| 2589 DECLARE_CAST(JSArgumentsObject) |
| 2590 |
| 2587 private: | 2591 private: |
| 2588 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject); | 2592 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject); |
| 2589 }; | 2593 }; |
| 2590 | 2594 |
| 2591 | 2595 |
| 2592 // JSSloppyArgumentsObject is just a JSObject with specific initial map. | 2596 // JSSloppyArgumentsObject is just a JSObject with specific initial map. |
| 2593 // This initial map adds in-object properties for "length" and "callee". | 2597 // This initial map adds in-object properties for "length" and "callee". |
| 2594 class JSSloppyArgumentsObject: public JSArgumentsObject { | 2598 class JSSloppyArgumentsObject: public JSArgumentsObject { |
| 2595 public: | 2599 public: |
| 2596 // Offsets of object fields. | 2600 // Offsets of object fields. |
| 2597 static const int kCalleeOffset = JSArgumentsObject::kHeaderSize; | 2601 static const int kCalleeOffset = JSArgumentsObject::kHeaderSize; |
| 2598 static const int kSize = kCalleeOffset + kPointerSize; | 2602 static const int kSize = kCalleeOffset + kPointerSize; |
| 2599 // Indices of in-object properties. | 2603 // Indices of in-object properties. |
| 2600 static const int kCalleeIndex = 1; | 2604 static const int kCalleeIndex = 1; |
| 2601 | 2605 |
| 2606 DECLARE_CAST(JSSloppyArgumentsObject) |
| 2607 |
| 2602 private: | 2608 private: |
| 2603 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject); | 2609 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject); |
| 2604 }; | 2610 }; |
| 2605 | 2611 |
| 2606 | 2612 |
| 2607 // JSStrictArgumentsObject is just a JSObject with specific initial map. | 2613 // JSStrictArgumentsObject is just a JSObject with specific initial map. |
| 2608 // This initial map adds an in-object property for "length". | 2614 // This initial map adds an in-object property for "length". |
| 2609 class JSStrictArgumentsObject: public JSArgumentsObject { | 2615 class JSStrictArgumentsObject: public JSArgumentsObject { |
| 2610 public: | 2616 public: |
| 2611 // Offsets of object fields. | 2617 // Offsets of object fields. |
| 2612 static const int kSize = JSArgumentsObject::kHeaderSize; | 2618 static const int kSize = JSArgumentsObject::kHeaderSize; |
| 2613 | 2619 |
| 2620 DECLARE_CAST(JSStrictArgumentsObject) |
| 2621 |
| 2614 private: | 2622 private: |
| 2615 DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject); | 2623 DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject); |
| 2616 }; | 2624 }; |
| 2617 | 2625 |
| 2618 | 2626 |
| 2619 // Common superclass for FixedArrays that allow implementations to share | 2627 // Common superclass for FixedArrays that allow implementations to share |
| 2620 // common accessors and some code paths. | 2628 // common accessors and some code paths. |
| 2621 class FixedArrayBase: public HeapObject { | 2629 class FixedArrayBase: public HeapObject { |
| 2622 public: | 2630 public: |
| 2623 // [length]: length of the array. | 2631 // [length]: length of the array. |
| (...skipping 8346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10970 } | 10978 } |
| 10971 return value; | 10979 return value; |
| 10972 } | 10980 } |
| 10973 }; | 10981 }; |
| 10974 | 10982 |
| 10975 | 10983 |
| 10976 } // NOLINT, false-positive due to second-order macros. | 10984 } // NOLINT, false-positive due to second-order macros. |
| 10977 } // NOLINT, false-positive due to second-order macros. | 10985 } // NOLINT, false-positive due to second-order macros. |
| 10978 | 10986 |
| 10979 #endif // V8_OBJECTS_H_ | 10987 #endif // V8_OBJECTS_H_ |
| OLD | NEW |