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