| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 6441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6452 inline void set_construction_count(int value); | 6452 inline void set_construction_count(int value); |
| 6453 inline int construction_count(); | 6453 inline int construction_count(); |
| 6454 inline void deprecate(); | 6454 inline void deprecate(); |
| 6455 inline bool is_deprecated(); | 6455 inline bool is_deprecated(); |
| 6456 inline bool CanBeDeprecated(); | 6456 inline bool CanBeDeprecated(); |
| 6457 // Returns a non-deprecated version of the input. If the input was not | 6457 // Returns a non-deprecated version of the input. If the input was not |
| 6458 // deprecated, it is directly returned. Otherwise, the non-deprecated version | 6458 // deprecated, it is directly returned. Otherwise, the non-deprecated version |
| 6459 // is found by re-transitioning from the root of the transition tree using the | 6459 // is found by re-transitioning from the root of the transition tree using the |
| 6460 // descriptor array of the map. Returns NULL if no updated map is found. | 6460 // descriptor array of the map. Returns NULL if no updated map is found. |
| 6461 // This method also applies any pending migrations along the prototype chain. | 6461 // This method also applies any pending migrations along the prototype chain. |
| 6462 static MaybeHandle<Map> CurrentMapForDeprecated(Handle<Map> map) | 6462 static MaybeHandle<Map> TryUpdate(Handle<Map> map) V8_WARN_UNUSED_RESULT; |
| 6463 // Same as above, but does not touch the prototype chain. |
| 6464 static MaybeHandle<Map> TryUpdateInternal(Handle<Map> map) |
| 6463 V8_WARN_UNUSED_RESULT; | 6465 V8_WARN_UNUSED_RESULT; |
| 6464 // Same as above, but does not touch the prototype chain. | 6466 |
| 6465 static MaybeHandle<Map> CurrentMapForDeprecatedInternal(Handle<Map> map) | 6467 // Returns a non-deprecated version of the input. This method may deprecate |
| 6466 V8_WARN_UNUSED_RESULT; | 6468 // existing maps along the way if encodings conflict. Not for use while |
| 6469 // gathering type feedback. Use TryUpdate in those cases instead. |
| 6470 static Handle<Map> Update(Handle<Map> map); |
| 6467 | 6471 |
| 6468 static Handle<Map> CopyDropDescriptors(Handle<Map> map); | 6472 static Handle<Map> CopyDropDescriptors(Handle<Map> map); |
| 6469 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, | 6473 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, |
| 6470 Descriptor* descriptor, | 6474 Descriptor* descriptor, |
| 6471 TransitionFlag flag); | 6475 TransitionFlag flag); |
| 6472 | 6476 |
| 6473 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( | 6477 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( |
| 6474 Handle<Map> map, | 6478 Handle<Map> map, |
| 6475 Handle<Name> name, | 6479 Handle<Name> name, |
| 6476 Handle<HeapType> type, | 6480 Handle<HeapType> type, |
| (...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11218 } else { | 11222 } else { |
| 11219 value &= ~(1 << bit_position); | 11223 value &= ~(1 << bit_position); |
| 11220 } | 11224 } |
| 11221 return value; | 11225 return value; |
| 11222 } | 11226 } |
| 11223 }; | 11227 }; |
| 11224 | 11228 |
| 11225 } } // namespace v8::internal | 11229 } } // namespace v8::internal |
| 11226 | 11230 |
| 11227 #endif // V8_OBJECTS_H_ | 11231 #endif // V8_OBJECTS_H_ |
| OLD | NEW |