OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |