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

Side by Side Diff: src/objects.h

Issue 661468: - Changed the initial size for HashTable.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 void ElementRemoved() { 1929 void ElementRemoved() {
1930 SetNumberOfElements(NumberOfElements() - 1); 1930 SetNumberOfElements(NumberOfElements() - 1);
1931 SetNumberOfDeletedElements(NumberOfDeletedElements() + 1); 1931 SetNumberOfDeletedElements(NumberOfDeletedElements() + 1);
1932 } 1932 }
1933 void ElementsRemoved(int n) { 1933 void ElementsRemoved(int n) {
1934 SetNumberOfElements(NumberOfElements() - n); 1934 SetNumberOfElements(NumberOfElements() - n);
1935 SetNumberOfDeletedElements(NumberOfDeletedElements() + n); 1935 SetNumberOfDeletedElements(NumberOfDeletedElements() + n);
1936 } 1936 }
1937 1937
1938 // Returns a new HashTable object. Might return Failure. 1938 // Returns a new HashTable object. Might return Failure.
1939 static Object* Allocate(int at_least_space_for); 1939 static Object* Allocate(int at_least_space_for,
1940 PretenureFlag pretenure = NOT_TENURED);
1940 1941
1941 // Returns the key at entry. 1942 // Returns the key at entry.
1942 Object* KeyAt(int entry) { return get(EntryToIndex(entry)); } 1943 Object* KeyAt(int entry) { return get(EntryToIndex(entry)); }
1943 1944
1944 // Tells whether k is a real key. Null and undefined are not allowed 1945 // Tells whether k is a real key. Null and undefined are not allowed
1945 // as keys and can be used to indicate missing or deleted elements. 1946 // as keys and can be used to indicate missing or deleted elements.
1946 bool IsKey(Object* k) { 1947 bool IsKey(Object* k) {
1947 return !k->IsNull() && !k->IsUndefined(); 1948 return !k->IsNull() && !k->IsUndefined();
1948 } 1949 }
1949 1950
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after
4980 } else { 4981 } else {
4981 value &= ~(1 << bit_position); 4982 value &= ~(1 << bit_position);
4982 } 4983 }
4983 return value; 4984 return value;
4984 } 4985 }
4985 }; 4986 };
4986 4987
4987 } } // namespace v8::internal 4988 } } // namespace v8::internal
4988 4989
4989 #endif // V8_OBJECTS_H_ 4990 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698