Commit 7ab274d4 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Make sure to clear any previously collected field maps.

TEST=http://www.chaostoperfection.com/
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c9db6148
......@@ -5574,15 +5574,15 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
void HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps(
Handle<Map> map) {
// Clear any previously collected field maps.
field_maps_.Clear();
// Figure out the field type from the accessor map.
Handle<HeapType> field_type(lookup_.GetFieldTypeFromMap(*map), isolate());
// Collect the (stable) maps from the field type.
int num_field_maps = field_type->NumClasses();
if (num_field_maps == 0) {
field_maps_.Clear();
return;
}
if (num_field_maps == 0) return;
ASSERT(access_.representation().IsHeapObject());
field_maps_.Reserve(num_field_maps, zone());
HeapType::Iterator<Map> it = field_type->Classes();
......
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