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

Side by Side Diff: src/objects.cc

Issue 9425045: Support fast case for-in in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: port to x64&arm, cleanup Created 8 years, 10 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
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 5688 matching lines...) Expand 10 before | Expand all | Expand 10 after
5699 } 5699 }
5700 result->set(kBitField3StorageIndex, Smi::FromInt(0)); 5700 result->set(kBitField3StorageIndex, Smi::FromInt(0));
5701 result->set(kContentArrayIndex, array); 5701 result->set(kContentArrayIndex, array);
5702 result->set(kEnumerationIndexIndex, 5702 result->set(kEnumerationIndexIndex,
5703 Smi::FromInt(PropertyDetails::kInitialIndex)); 5703 Smi::FromInt(PropertyDetails::kInitialIndex));
5704 return result; 5704 return result;
5705 } 5705 }
5706 5706
5707 5707
5708 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, 5708 void DescriptorArray::SetEnumCache(FixedArray* bridge_storage,
5709 FixedArray* new_cache) { 5709 FixedArray* new_cache,
5710 Object* new_index_cache) {
5710 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); 5711 ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength);
5712 ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray());
5711 if (HasEnumCache()) { 5713 if (HasEnumCache()) {
5712 FixedArray::cast(get(kEnumerationIndexIndex))-> 5714 FixedArray::cast(get(kEnumerationIndexIndex))->
5713 set(kEnumCacheBridgeCacheIndex, new_cache); 5715 set(kEnumCacheBridgeCacheIndex, new_cache);
5716 FixedArray::cast(get(kEnumerationIndexIndex))->
5717 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache);
5714 } else { 5718 } else {
5715 if (IsEmpty()) return; // Do nothing for empty descriptor array. 5719 if (IsEmpty()) return; // Do nothing for empty descriptor array.
5716 FixedArray::cast(bridge_storage)-> 5720 FixedArray::cast(bridge_storage)->
5717 set(kEnumCacheBridgeCacheIndex, new_cache); 5721 set(kEnumCacheBridgeCacheIndex, new_cache);
5722 FixedArray::cast(bridge_storage)->
5723 set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache);
5718 NoWriteBarrierSet(FixedArray::cast(bridge_storage), 5724 NoWriteBarrierSet(FixedArray::cast(bridge_storage),
5719 kEnumCacheBridgeEnumIndex, 5725 kEnumCacheBridgeEnumIndex,
5720 get(kEnumerationIndexIndex)); 5726 get(kEnumerationIndexIndex));
5721 set(kEnumerationIndexIndex, bridge_storage); 5727 set(kEnumerationIndexIndex, bridge_storage);
5722 } 5728 }
5723 } 5729 }
5724 5730
5725 5731
5726 static bool InsertionPointFound(String* key1, String* key2) { 5732 static bool InsertionPointFound(String* key1, String* key2) {
5727 return key1->Hash() > key2->Hash() || key1 == key2; 5733 return key1->Hash() > key2->Hash() || key1 == key2;
(...skipping 7347 matching lines...) Expand 10 before | Expand all | Expand 10 after
13075 if (break_point_objects()->IsUndefined()) return 0; 13081 if (break_point_objects()->IsUndefined()) return 0;
13076 // Single break point. 13082 // Single break point.
13077 if (!break_point_objects()->IsFixedArray()) return 1; 13083 if (!break_point_objects()->IsFixedArray()) return 1;
13078 // Multiple break points. 13084 // Multiple break points.
13079 return FixedArray::cast(break_point_objects())->length(); 13085 return FixedArray::cast(break_point_objects())->length();
13080 } 13086 }
13081 #endif // ENABLE_DEBUGGER_SUPPORT 13087 #endif // ENABLE_DEBUGGER_SUPPORT
13082 13088
13083 13089
13084 } } // namespace v8::internal 13090 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698