Commit 23d38099 authored by Choongwoo Han's avatar Choongwoo Han Committed by Commit Bot

Make a transition for too many JSFunction properties

If we add new properties by assigning JSFunction values, properties
array was not changed into a dictionary map.

Bug: v8:7461
Change-Id: Ie16f974502d0ba362e3650a409c27cdc5856a373
Reviewed-on: https://chromium-review.googlesource.com/1028110Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52907}
parent 34fc7f62
...@@ -9786,14 +9786,16 @@ Handle<Map> Map::TransitionToDataProperty(Handle<Map> map, Handle<Name> name, ...@@ -9786,14 +9786,16 @@ Handle<Map> Map::TransitionToDataProperty(Handle<Map> map, Handle<Name> name,
TransitionFlag flag = INSERT_TRANSITION; TransitionFlag flag = INSERT_TRANSITION;
MaybeHandle<Map> maybe_map; MaybeHandle<Map> maybe_map;
if (!FLAG_track_constant_fields && value->IsJSFunction()) { if (!map->TooManyFastProperties(store_mode)) {
maybe_map = Map::CopyWithConstant(map, name, value, attributes, flag); if (!FLAG_track_constant_fields && value->IsJSFunction()) {
} else if (!map->TooManyFastProperties(store_mode)) { maybe_map = Map::CopyWithConstant(map, name, value, attributes, flag);
Isolate* isolate = name->GetIsolate(); } else {
Representation representation = value->OptimalRepresentation(); Isolate* isolate = name->GetIsolate();
Handle<FieldType> type = value->OptimalType(isolate, representation); Representation representation = value->OptimalRepresentation();
maybe_map = Map::CopyWithField(map, name, type, attributes, constness, Handle<FieldType> type = value->OptimalType(isolate, representation);
representation, flag); maybe_map = Map::CopyWithField(map, name, type, attributes, constness,
representation, flag);
}
} }
Handle<Map> result; Handle<Map> result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment