| 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 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4435 inline int flags(); | 4435 inline int flags(); |
| 4436 inline void set_flags(int flags); | 4436 inline void set_flags(int flags); |
| 4437 class GroupField : public BitField<int, 0, 3> {}; | 4437 class GroupField : public BitField<int, 0, 3> {}; |
| 4438 class CountField : public BitField<int, 3, 27> {}; | 4438 class CountField : public BitField<int, 3, 27> {}; |
| 4439 STATIC_ASSERT(kGroupCount <= GroupField::kMax + 1); | 4439 STATIC_ASSERT(kGroupCount <= GroupField::kMax + 1); |
| 4440 }; | 4440 }; |
| 4441 | 4441 |
| 4442 | 4442 |
| 4443 class PrototypeInfo; | 4443 class PrototypeInfo; |
| 4444 | 4444 |
| 4445 typedef std::vector<Handle<Map>> MapHandles; |
| 4445 | 4446 |
| 4446 // All heap objects have a Map that describes their structure. | 4447 // All heap objects have a Map that describes their structure. |
| 4447 // A Map contains information about: | 4448 // A Map contains information about: |
| 4448 // - Size information about the object | 4449 // - Size information about the object |
| 4449 // - How to iterate over an object (for garbage collection) | 4450 // - How to iterate over an object (for garbage collection) |
| 4450 class Map: public HeapObject { | 4451 class Map: public HeapObject { |
| 4451 public: | 4452 public: |
| 4452 // Instance size. | 4453 // Instance size. |
| 4453 // Size in bytes or kVariableSizeSentinel if instances do not have | 4454 // Size in bytes or kVariableSizeSentinel if instances do not have |
| 4454 // a fixed size. | 4455 // a fixed size. |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4957 Code* LookupInCodeCache(Name* name, Code::Flags code); | 4958 Code* LookupInCodeCache(Name* name, Code::Flags code); |
| 4958 | 4959 |
| 4959 static Handle<Map> GetObjectCreateMap(Handle<HeapObject> prototype); | 4960 static Handle<Map> GetObjectCreateMap(Handle<HeapObject> prototype); |
| 4960 | 4961 |
| 4961 // Computes a hash value for this map, to be used in HashTables and such. | 4962 // Computes a hash value for this map, to be used in HashTables and such. |
| 4962 int Hash(); | 4963 int Hash(); |
| 4963 | 4964 |
| 4964 // Returns the transitioned map for this map with the most generic | 4965 // Returns the transitioned map for this map with the most generic |
| 4965 // elements_kind that's found in |candidates|, or |nullptr| if no match is | 4966 // elements_kind that's found in |candidates|, or |nullptr| if no match is |
| 4966 // found at all. | 4967 // found at all. |
| 4967 Map* FindElementsKindTransitionedMap(MapHandleList* candidates); | 4968 Map* FindElementsKindTransitionedMap(MapHandles const& candidates); |
| 4968 | 4969 |
| 4969 inline bool CanTransition(); | 4970 inline bool CanTransition(); |
| 4970 | 4971 |
| 4971 inline bool IsBooleanMap(); | 4972 inline bool IsBooleanMap(); |
| 4972 inline bool IsPrimitiveMap(); | 4973 inline bool IsPrimitiveMap(); |
| 4973 inline bool IsJSReceiverMap(); | 4974 inline bool IsJSReceiverMap(); |
| 4974 inline bool IsJSObjectMap(); | 4975 inline bool IsJSObjectMap(); |
| 4975 inline bool IsJSArrayMap(); | 4976 inline bool IsJSArrayMap(); |
| 4976 inline bool IsJSFunctionMap(); | 4977 inline bool IsJSFunctionMap(); |
| 4977 inline bool IsStringMap(); | 4978 inline bool IsStringMap(); |
| (...skipping 5258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10236 } | 10237 } |
| 10237 }; | 10238 }; |
| 10238 | 10239 |
| 10239 | 10240 |
| 10240 } // NOLINT, false-positive due to second-order macros. | 10241 } // NOLINT, false-positive due to second-order macros. |
| 10241 } // NOLINT, false-positive due to second-order macros. | 10242 } // NOLINT, false-positive due to second-order macros. |
| 10242 | 10243 |
| 10243 #include "src/objects/object-macros-undef.h" | 10244 #include "src/objects/object-macros-undef.h" |
| 10244 | 10245 |
| 10245 #endif // V8_OBJECTS_H_ | 10246 #endif // V8_OBJECTS_H_ |
| OLD | NEW |