diff options
Diffstat (limited to 'deps/v8/src/map-updater.h')
-rw-r--r-- | deps/v8/src/map-updater.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/deps/v8/src/map-updater.h b/deps/v8/src/map-updater.h index 215aa07573..a1d052261c 100644 --- a/deps/v8/src/map-updater.h +++ b/deps/v8/src/map-updater.h @@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef V8_MAP_RECONFIGURER_H_ -#define V8_MAP_RECONFIGURER_H_ +#ifndef V8_MAP_UPDATER_H_ +#define V8_MAP_UPDATER_H_ #include "src/elements-kind.h" +#include "src/field-type.h" #include "src/globals.h" #include "src/handles.h" -#include "src/objects.h" +#include "src/objects/map.h" #include "src/property-details.h" namespace v8 { @@ -48,7 +49,9 @@ class MapUpdater { old_map_(old_map), old_descriptors_(old_map->instance_descriptors(), isolate_), old_nof_(old_map_->NumberOfOwnDescriptors()), - new_elements_kind_(old_map_->elements_kind()) { + new_elements_kind_(old_map_->elements_kind()), + is_transitionable_fast_elements_kind_( + IsTransitionableFastElementsKind(new_elements_kind_)) { // We shouldn't try to update remote objects. DCHECK(!old_map->FindRootMap()->GetConstructor()->IsFunctionTemplateInfo()); } @@ -145,6 +148,10 @@ class MapUpdater { Handle<DescriptorArray> descriptors, int descriptor, PropertyLocation location, Representation representation); + inline void GeneralizeIfTransitionableFastElementsKind( + PropertyConstness* constness, Representation* representation, + Handle<FieldType>* field_type); + void GeneralizeField(Handle<Map> map, int modify_index, PropertyConstness new_constness, Representation new_representation, @@ -160,8 +167,9 @@ class MapUpdater { State state_ = kInitialized; ElementsKind new_elements_kind_; + bool is_transitionable_fast_elements_kind_; - // If |modified_descriptor_| is not equal to -1 them the fields below form + // If |modified_descriptor_| is not equal to -1 then the fields below form // an "update" of the |old_map_|'s descriptors. int modified_descriptor_ = -1; PropertyKind new_kind_ = kData; @@ -180,4 +188,4 @@ class MapUpdater { } // namespace internal } // namespace v8 -#endif // V8_MAP_RECONFIGURER_H_ +#endif // V8_MAP_UPDATER_H_ |