OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4961 // deoptimized when the map is garbage collected. | 4961 // deoptimized when the map is garbage collected. |
4962 kWeaklyEmbeddedGroup, | 4962 kWeaklyEmbeddedGroup, |
4963 // Group of code that embed a transition to this map, and depend on being | 4963 // Group of code that embed a transition to this map, and depend on being |
4964 // deoptimized when the transition is replaced by a new version. | 4964 // deoptimized when the transition is replaced by a new version. |
4965 kTransitionGroup, | 4965 kTransitionGroup, |
4966 // Group of code that omit run-time prototype checks for prototypes | 4966 // Group of code that omit run-time prototype checks for prototypes |
4967 // described by this map. The group is deoptimized whenever an object | 4967 // described by this map. The group is deoptimized whenever an object |
4968 // described by this map changes shape (and transitions to a new map), | 4968 // described by this map changes shape (and transitions to a new map), |
4969 // possibly invalidating the assumptions embedded in the code. | 4969 // possibly invalidating the assumptions embedded in the code. |
4970 kPrototypeCheckGroup, | 4970 kPrototypeCheckGroup, |
4971 kGroupCount = kPrototypeCheckGroup + 1 | 4971 // Group of code that depends on elements not being added to objects with |
| 4972 // this map. |
| 4973 kElementsCantBeAddedGroup, |
| 4974 kGroupCount = kElementsCantBeAddedGroup + 1 |
4972 }; | 4975 }; |
4973 | 4976 |
4974 // Array for holding the index of the first code object of each group. | 4977 // Array for holding the index of the first code object of each group. |
4975 // The last element stores the total number of code objects. | 4978 // The last element stores the total number of code objects. |
4976 class GroupStartIndexes { | 4979 class GroupStartIndexes { |
4977 public: | 4980 public: |
4978 explicit GroupStartIndexes(DependentCode* entries); | 4981 explicit GroupStartIndexes(DependentCode* entries); |
4979 void Recompute(DependentCode* entries); | 4982 void Recompute(DependentCode* entries); |
4980 int at(int i) { return start_indexes_[i]; } | 4983 int at(int i) { return start_indexes_[i]; } |
4981 int number_of_entries() { return start_indexes_[kGroupCount]; } | 4984 int number_of_entries() { return start_indexes_[kGroupCount]; } |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5493 // Fires when the layout of an object with a leaf map changes. | 5496 // Fires when the layout of an object with a leaf map changes. |
5494 // This includes adding transitions to the leaf map or changing | 5497 // This includes adding transitions to the leaf map or changing |
5495 // the descriptor array. | 5498 // the descriptor array. |
5496 inline void NotifyLeafMapLayoutChange(); | 5499 inline void NotifyLeafMapLayoutChange(); |
5497 | 5500 |
5498 inline bool CanOmitPrototypeChecks(); | 5501 inline bool CanOmitPrototypeChecks(); |
5499 | 5502 |
5500 inline void AddDependentCode(DependentCode::DependencyGroup group, | 5503 inline void AddDependentCode(DependentCode::DependencyGroup group, |
5501 Handle<Code> code); | 5504 Handle<Code> code); |
5502 | 5505 |
| 5506 bool IsMapInArrayPrototypeChain(); |
| 5507 |
5503 // Dispatched behavior. | 5508 // Dispatched behavior. |
5504 DECLARE_PRINTER(Map) | 5509 DECLARE_PRINTER(Map) |
5505 DECLARE_VERIFIER(Map) | 5510 DECLARE_VERIFIER(Map) |
5506 | 5511 |
5507 #ifdef VERIFY_HEAP | 5512 #ifdef VERIFY_HEAP |
5508 void SharedMapVerify(); | 5513 void SharedMapVerify(); |
5509 void VerifyOmittedPrototypeChecks(); | 5514 void VerifyOmittedPrototypeChecks(); |
5510 #endif | 5515 #endif |
5511 | 5516 |
5512 inline int visitor_id(); | 5517 inline int visitor_id(); |
(...skipping 4055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9568 } else { | 9573 } else { |
9569 value &= ~(1 << bit_position); | 9574 value &= ~(1 << bit_position); |
9570 } | 9575 } |
9571 return value; | 9576 return value; |
9572 } | 9577 } |
9573 }; | 9578 }; |
9574 | 9579 |
9575 } } // namespace v8::internal | 9580 } } // namespace v8::internal |
9576 | 9581 |
9577 #endif // V8_OBJECTS_H_ | 9582 #endif // V8_OBJECTS_H_ |
OLD | NEW |