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

Side by Side Diff: src/objects.h

Issue 11415051: Revert r12990 and r12991 from trunk. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 1 month 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/d8.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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 // Property access. 966 // Property access.
967 MUST_USE_RESULT inline MaybeObject* GetProperty(String* key); 967 MUST_USE_RESULT inline MaybeObject* GetProperty(String* key);
968 MUST_USE_RESULT inline MaybeObject* GetProperty( 968 MUST_USE_RESULT inline MaybeObject* GetProperty(
969 String* key, 969 String* key,
970 PropertyAttributes* attributes); 970 PropertyAttributes* attributes);
971 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( 971 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver(
972 Object* receiver, 972 Object* receiver,
973 String* key, 973 String* key,
974 PropertyAttributes* attributes); 974 PropertyAttributes* attributes);
975 975
976 static Handle<Object> GetProperty(Handle<Object> object, Handle<String> key);
977 static Handle<Object> GetProperty(Handle<Object> object, 976 static Handle<Object> GetProperty(Handle<Object> object,
978 Handle<Object> receiver, 977 Handle<Object> receiver,
979 LookupResult* result, 978 LookupResult* result,
980 Handle<String> key, 979 Handle<String> key,
981 PropertyAttributes* attributes); 980 PropertyAttributes* attributes);
982 981
983 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, 982 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver,
984 LookupResult* result, 983 LookupResult* result,
985 String* key, 984 String* key,
986 PropertyAttributes* attributes); 985 PropertyAttributes* attributes);
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements); 1839 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements);
1841 1840
1842 // Computes the new capacity when expanding the elements of a JSObject. 1841 // Computes the new capacity when expanding the elements of a JSObject.
1843 static int NewElementsCapacity(int old_capacity) { 1842 static int NewElementsCapacity(int old_capacity) {
1844 // (old_capacity + 50%) + 16 1843 // (old_capacity + 50%) + 16
1845 return old_capacity + (old_capacity >> 1) + 16; 1844 return old_capacity + (old_capacity >> 1) + 16;
1846 } 1845 }
1847 1846
1848 PropertyType GetLocalPropertyType(String* name); 1847 PropertyType GetLocalPropertyType(String* name);
1849 PropertyType GetLocalElementType(uint32_t index); 1848 PropertyType GetLocalElementType(uint32_t index);
1850
1851 // These methods do not perform access checks!
1852 AccessorPair* GetLocalPropertyAccessorPair(String* name); 1849 AccessorPair* GetLocalPropertyAccessorPair(String* name);
1853 AccessorPair* GetLocalElementAccessorPair(uint32_t index); 1850 AccessorPair* GetLocalElementAccessorPair(uint32_t index);
1854 1851
1852 // Tells whether the index'th element is present and how it is stored.
1853 enum LocalElementKind {
1854 // There is no element with given index.
1855 UNDEFINED_ELEMENT,
1856
1857 // Element with given index is handled by interceptor.
1858 INTERCEPTED_ELEMENT,
1859
1860 // Element with given index is character in string.
1861 STRING_CHARACTER_ELEMENT,
1862
1863 // Element with given index is stored in fast backing store.
1864 FAST_ELEMENT,
1865
1866 // Element with given index is stored in slow backing store.
1867 DICTIONARY_ELEMENT
1868 };
1869
1870 LocalElementKind GetLocalElementKind(uint32_t index);
1871
1855 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index, 1872 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index,
1856 Object* value, 1873 Object* value,
1857 StrictModeFlag strict_mode, 1874 StrictModeFlag strict_mode,
1858 bool check_prototype); 1875 bool check_prototype);
1859 1876
1860 MUST_USE_RESULT MaybeObject* SetDictionaryElement( 1877 MUST_USE_RESULT MaybeObject* SetDictionaryElement(
1861 uint32_t index, 1878 uint32_t index,
1862 Object* value, 1879 Object* value,
1863 PropertyAttributes attributes, 1880 PropertyAttributes attributes,
1864 StrictModeFlag strict_mode, 1881 StrictModeFlag strict_mode,
(...skipping 7136 matching lines...) Expand 10 before | Expand all | Expand 10 after
9001 } else { 9018 } else {
9002 value &= ~(1 << bit_position); 9019 value &= ~(1 << bit_position);
9003 } 9020 }
9004 return value; 9021 return value;
9005 } 9022 }
9006 }; 9023 };
9007 9024
9008 } } // namespace v8::internal 9025 } } // namespace v8::internal
9009 9026
9010 #endif // V8_OBJECTS_H_ 9027 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698