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 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2571 | 2572 |
2572 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject. | 2573 // Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject. |
2573 class JSArgumentsObject: public JSObject { | 2574 class JSArgumentsObject: public JSObject { |
2574 public: | 2575 public: |
2575 // Offsets of object fields. | 2576 // Offsets of object fields. |
2576 static const int kLengthOffset = JSObject::kHeaderSize; | 2577 static const int kLengthOffset = JSObject::kHeaderSize; |
2577 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2578 static const int kHeaderSize = kLengthOffset + kPointerSize; |
2578 // Indices of in-object properties. | 2579 // Indices of in-object properties. |
2579 static const int kLengthIndex = 0; | 2580 static const int kLengthIndex = 0; |
2580 | 2581 |
| 2582 DECLARE_VERIFIER(JSArgumentsObject) |
| 2583 DECLARE_CAST(JSArgumentsObject) |
| 2584 |
2581 private: | 2585 private: |
2582 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject); | 2586 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject); |
2583 }; | 2587 }; |
2584 | 2588 |
2585 | 2589 |
2586 // JSSloppyArgumentsObject is just a JSObject with specific initial map. | 2590 // JSSloppyArgumentsObject is just a JSObject with specific initial map. |
2587 // This initial map adds in-object properties for "length" and "callee". | 2591 // This initial map adds in-object properties for "length" and "callee". |
2588 class JSSloppyArgumentsObject: public JSArgumentsObject { | 2592 class JSSloppyArgumentsObject: public JSArgumentsObject { |
2589 public: | 2593 public: |
2590 // Offsets of object fields. | 2594 // Offsets of object fields. |
2591 static const int kCalleeOffset = JSArgumentsObject::kHeaderSize; | 2595 static const int kCalleeOffset = JSArgumentsObject::kHeaderSize; |
2592 static const int kSize = kCalleeOffset + kPointerSize; | 2596 static const int kSize = kCalleeOffset + kPointerSize; |
2593 // Indices of in-object properties. | 2597 // Indices of in-object properties. |
2594 static const int kCalleeIndex = 1; | 2598 static const int kCalleeIndex = 1; |
2595 | 2599 |
| 2600 DECLARE_CAST(JSSloppyArgumentsObject) |
| 2601 |
2596 private: | 2602 private: |
2597 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject); | 2603 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject); |
2598 }; | 2604 }; |
2599 | 2605 |
2600 | 2606 |
2601 // JSStrictArgumentsObject is just a JSObject with specific initial map. | 2607 // JSStrictArgumentsObject is just a JSObject with specific initial map. |
2602 // This initial map adds an in-object property for "length". | 2608 // This initial map adds an in-object property for "length". |
2603 class JSStrictArgumentsObject: public JSArgumentsObject { | 2609 class JSStrictArgumentsObject: public JSArgumentsObject { |
2604 public: | 2610 public: |
2605 // Offsets of object fields. | 2611 // Offsets of object fields. |
2606 static const int kSize = JSArgumentsObject::kHeaderSize; | 2612 static const int kSize = JSArgumentsObject::kHeaderSize; |
2607 | 2613 |
| 2614 DECLARE_CAST(JSStrictArgumentsObject) |
| 2615 |
2608 private: | 2616 private: |
2609 DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject); | 2617 DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject); |
2610 }; | 2618 }; |
2611 | 2619 |
2612 | 2620 |
2613 // Common superclass for FixedArrays that allow implementations to share | 2621 // Common superclass for FixedArrays that allow implementations to share |
2614 // common accessors and some code paths. | 2622 // common accessors and some code paths. |
2615 class FixedArrayBase: public HeapObject { | 2623 class FixedArrayBase: public HeapObject { |
2616 public: | 2624 public: |
2617 // [length]: length of the array. | 2625 // [length]: length of the array. |
(...skipping 8347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10965 } | 10973 } |
10966 return value; | 10974 return value; |
10967 } | 10975 } |
10968 }; | 10976 }; |
10969 | 10977 |
10970 | 10978 |
10971 } // NOLINT, false-positive due to second-order macros. | 10979 } // NOLINT, false-positive due to second-order macros. |
10972 } // NOLINT, false-positive due to second-order macros. | 10980 } // NOLINT, false-positive due to second-order macros. |
10973 | 10981 |
10974 #endif // V8_OBJECTS_H_ | 10982 #endif // V8_OBJECTS_H_ |
OLD | NEW |