Commit 15e0189c authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Fix and improve Map::CurrentMapForDeprecatedInternal().

Inline relevant bits from Map::FindUpdatedMap() and Map::IsMoreGeneralThan()
into Map::CurrentMapForDeprecatedInternal() to fix issues introduced
with field type tracking, avoid the useless second pass over the transition
tree, and finally make it easier to understand what this method actually
does.

TEST=mjsunit/regress/regress-365172-2
R=svenpanne@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=20997

Review URL: https://codereview.chromium.org/257893004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5396d4e9
This diff is collapsed.
......@@ -3441,20 +3441,6 @@ class DescriptorArray: public FixedArray {
// array.
inline void Append(Descriptor* desc);
static Handle<DescriptorArray> Merge(Handle<Map> left_map,
int verbatim,
int valid,
int new_size,
int modify_index,
StoreMode store_mode,
Handle<Map> right_map)
V8_WARN_UNUSED_RESULT;
bool IsMoreGeneralThan(int verbatim,
int valid,
int new_size,
DescriptorArray* other);
static Handle<DescriptorArray> CopyUpTo(Handle<DescriptorArray> desc,
int enumeration_index,
int slack = 0);
......@@ -6733,7 +6719,6 @@ class Map: public HeapObject {
void DeprecateTransitionTree();
void DeprecateTarget(Name* key, DescriptorArray* new_descriptors);
Map* FindUpdatedMap(int verbatim, int length, DescriptorArray* descriptors);
Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
void UpdateDescriptor(int descriptor_number, Descriptor* desc);
......
......@@ -66,6 +66,7 @@ class Descriptor BASE_EMBEDDED {
details_(attributes, type, representation, field_index) { }
friend class DescriptorArray;
friend class Map;
};
......
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