Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: src/handles.cc

Issue 11035053: Rollback trunk to bleeding_edge revision 12525 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 // enum length of the map by counting the number of own descriptors that 728 // enum length of the map by counting the number of own descriptors that
729 // are not DONT_ENUM. 729 // are not DONT_ENUM.
730 if (own_property_count == Map::kInvalidEnumCache) { 730 if (own_property_count == Map::kInvalidEnumCache) {
731 own_property_count = object->map()->NumberOfDescribedProperties( 731 own_property_count = object->map()->NumberOfDescribedProperties(
732 OWN_DESCRIPTORS, DONT_ENUM); 732 OWN_DESCRIPTORS, DONT_ENUM);
733 733
734 if (cache_result) object->map()->SetEnumLength(own_property_count); 734 if (cache_result) object->map()->SetEnumLength(own_property_count);
735 } 735 }
736 736
737 DescriptorArray* desc = object->map()->instance_descriptors(); 737 DescriptorArray* desc = object->map()->instance_descriptors();
738 Handle<FixedArray> keys(desc->GetEnumCache(), isolate); 738 Handle<FixedArray> keys(FixedArray::cast(desc->GetEnumCache()), isolate);
739 739
740 // In case the number of properties required in the enum are actually 740 // In case the number of properties required in the enum are actually
741 // present, we can reuse the enum cache. Otherwise, this means that the 741 // present, we can reuse the enum cache. Otherwise, this means that the
742 // enum cache was generated for a previous (smaller) version of the 742 // enum cache was generated for a previous (smaller) version of the
743 // Descriptor Array. In that case we regenerate the enum cache. 743 // Descriptor Array. In that case we regenerate the enum cache.
744 if (own_property_count <= keys->length()) { 744 if (own_property_count <= keys->length()) {
745 isolate->counters()->enum_cache_hits()->Increment(); 745 isolate->counters()->enum_cache_hits()->Increment();
746 return ReduceFixedArrayTo(keys, own_property_count); 746 return ReduceFixedArrayTo(keys, own_property_count);
747 } 747 }
748 } 748 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 data->next = prev_next_; 1058 data->next = prev_next_;
1059 data->limit = prev_limit_; 1059 data->limit = prev_limit_;
1060 #ifdef DEBUG 1060 #ifdef DEBUG
1061 handles_detached_ = true; 1061 handles_detached_ = true;
1062 #endif 1062 #endif
1063 return deferred; 1063 return deferred;
1064 } 1064 }
1065 1065
1066 1066
1067 } } // namespace v8::internal 1067 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698