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.h

Issue 230733003: ElementsAccessor::Delete() maybehandlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing on r20629 Created 6 years, 8 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/elements.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 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 StoreFromKeyed store_mode, 2918 StoreFromKeyed store_mode,
2919 ValueType value_type, 2919 ValueType value_type,
2920 TransitionFlag flag); 2920 TransitionFlag flag);
2921 2921
2922 // Add a property to a slow-case object. 2922 // Add a property to a slow-case object.
2923 static void AddSlowProperty(Handle<JSObject> object, 2923 static void AddSlowProperty(Handle<JSObject> object,
2924 Handle<Name> name, 2924 Handle<Name> name,
2925 Handle<Object> value, 2925 Handle<Object> value,
2926 PropertyAttributes attributes); 2926 PropertyAttributes attributes);
2927 2927
2928 static Handle<Object> DeleteProperty(Handle<JSObject> object, 2928 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
2929 Handle<Name> name, 2929 Handle<JSObject> object,
2930 DeleteMode mode); 2930 Handle<Name> name,
2931 DeleteMode mode);
2931 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object, 2932 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object,
2932 Handle<Name> name, 2933 Handle<Name> name,
2933 DeleteMode mode); 2934 DeleteMode mode);
2934 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object, 2935 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object,
2935 Handle<Name> name); 2936 Handle<Name> name);
2936 2937
2937 // Deletes the named property in a normalized object. 2938 // Deletes the named property in a normalized object.
2938 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object, 2939 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object,
2939 Handle<Name> name, 2940 Handle<Name> name,
2940 DeleteMode mode); 2941 DeleteMode mode);
2941 2942
2942 static Handle<Object> DeleteElement(Handle<JSObject> object, 2943 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
2943 uint32_t index, 2944 Handle<JSObject> object,
2944 DeleteMode mode); 2945 uint32_t index,
2945 static Handle<Object> DeleteElementWithInterceptor(Handle<JSObject> object, 2946 DeleteMode mode);
2946 uint32_t index); 2947 MUST_USE_RESULT static MaybeHandle<Object> DeleteElementWithInterceptor(
2948 Handle<JSObject> object,
2949 uint32_t index);
2947 2950
2948 bool ReferencesObjectFromElements(FixedArray* elements, 2951 bool ReferencesObjectFromElements(FixedArray* elements,
2949 ElementsKind kind, 2952 ElementsKind kind,
2950 Object* object); 2953 Object* object);
2951 2954
2952 // Returns true if most of the elements backing storage is used. 2955 // Returns true if most of the elements backing storage is used.
2953 bool HasDenseElements(); 2956 bool HasDenseElements();
2954 2957
2955 // Gets the current elements capacity and the number of used elements. 2958 // Gets the current elements capacity and the number of used elements.
2956 void GetElementsCapacityAndUsage(int* capacity, int* used); 2959 void GetElementsCapacityAndUsage(int* capacity, int* used);
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
3967 // Set the details for entry. 3970 // Set the details for entry.
3968 void DetailsAtPut(int entry, PropertyDetails value) { 3971 void DetailsAtPut(int entry, PropertyDetails value) {
3969 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi()); 3972 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi());
3970 } 3973 }
3971 3974
3972 // Sorting support 3975 // Sorting support
3973 void CopyValuesTo(FixedArray* elements); 3976 void CopyValuesTo(FixedArray* elements);
3974 3977
3975 // Delete a property from the dictionary. 3978 // Delete a property from the dictionary.
3976 Object* DeleteProperty(int entry, JSObject::DeleteMode mode); 3979 Object* DeleteProperty(int entry, JSObject::DeleteMode mode);
3980 // TODO(ishell): Temporary wrapper until handlified.
3981 static Handle<Object> DeleteProperty(
3982 Handle<Dictionary<Shape, Key> > dictionary,
3983 int entry,
3984 JSObject::DeleteMode mode);
3977 3985
3978 // Attempt to shrink the dictionary after deletion of key. 3986 // Attempt to shrink the dictionary after deletion of key.
3979 MUST_USE_RESULT MaybeObject* Shrink(Key key); 3987 MUST_USE_RESULT MaybeObject* Shrink(Key key);
3988 // TODO(ishell): Temporary wrapper until handlified.
3989 MUST_USE_RESULT static Handle<FixedArray> Shrink(
3990 Handle<Dictionary<Shape, Key> > dictionary,
3991 Key key);
3980 3992
3981 // Returns the number of elements in the dictionary filtering out properties 3993 // Returns the number of elements in the dictionary filtering out properties
3982 // with the specified attributes. 3994 // with the specified attributes.
3983 int NumberOfElementsFilterAttributes(PropertyAttributes filter); 3995 int NumberOfElementsFilterAttributes(PropertyAttributes filter);
3984 3996
3985 // Returns the number of enumerable elements in the dictionary. 3997 // Returns the number of enumerable elements in the dictionary.
3986 int NumberOfEnumElements(); 3998 int NumberOfEnumElements();
3987 3999
3988 enum SortMode { UNSORTED, SORTED }; 4000 enum SortMode { UNSORTED, SORTED };
3989 // Copies keys to preallocated fixed array. 4001 // Copies keys to preallocated fixed array.
(...skipping 7009 matching lines...) Expand 10 before | Expand all | Expand 10 after
10999 } else { 11011 } else {
11000 value &= ~(1 << bit_position); 11012 value &= ~(1 << bit_position);
11001 } 11013 }
11002 return value; 11014 return value;
11003 } 11015 }
11004 }; 11016 };
11005 11017
11006 } } // namespace v8::internal 11018 } } // namespace v8::internal
11007 11019
11008 #endif // V8_OBJECTS_H_ 11020 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698