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

Side by Side Diff: src/objects.h

Issue 10916076: Optimize dictionary enum generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding comments. Created 8 years, 3 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/handles.cc ('k') | src/objects.cc » ('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 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 3121
3122 3122
3123 class StringDictionary: public Dictionary<StringDictionaryShape, String*> { 3123 class StringDictionary: public Dictionary<StringDictionaryShape, String*> {
3124 public: 3124 public:
3125 static inline StringDictionary* cast(Object* obj) { 3125 static inline StringDictionary* cast(Object* obj) {
3126 ASSERT(obj->IsDictionary()); 3126 ASSERT(obj->IsDictionary());
3127 return reinterpret_cast<StringDictionary*>(obj); 3127 return reinterpret_cast<StringDictionary*>(obj);
3128 } 3128 }
3129 3129
3130 // Copies enumerable keys to preallocated fixed array. 3130 // Copies enumerable keys to preallocated fixed array.
3131 void CopyEnumKeysTo(FixedArray* storage, FixedArray* sort_array); 3131 void CopyEnumKeysTo(FixedArray* storage);
3132 static void DoGenerateNewEnumerationIndices(
3133 Handle<StringDictionary> dictionary);
3132 3134
3133 // For transforming properties of a JSObject. 3135 // For transforming properties of a JSObject.
3134 MUST_USE_RESULT MaybeObject* TransformPropertiesToFastFor( 3136 MUST_USE_RESULT MaybeObject* TransformPropertiesToFastFor(
3135 JSObject* obj, 3137 JSObject* obj,
3136 int unused_property_fields); 3138 int unused_property_fields);
3137 3139
3138 // Find entry for key, otherwise return kNotFound. Optimized version of 3140 // Find entry for key, otherwise return kNotFound. Optimized version of
3139 // HashTable::FindEntry. 3141 // HashTable::FindEntry.
3140 int FindEntry(String* key); 3142 int FindEntry(String* key);
3141 }; 3143 };
(...skipping 5806 matching lines...) Expand 10 before | Expand all | Expand 10 after
8948 } else { 8950 } else {
8949 value &= ~(1 << bit_position); 8951 value &= ~(1 << bit_position);
8950 } 8952 }
8951 return value; 8953 return value;
8952 } 8954 }
8953 }; 8955 };
8954 8956
8955 } } // namespace v8::internal 8957 } } // namespace v8::internal
8956 8958
8957 #endif // V8_OBJECTS_H_ 8959 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698