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

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: 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') | src/objects.cc » ('J')
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 2911 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 StoreFromKeyed store_mode, 2922 StoreFromKeyed store_mode,
2923 ValueType value_type, 2923 ValueType value_type,
2924 TransitionFlag flag); 2924 TransitionFlag flag);
2925 2925
2926 // Add a property to a slow-case object. 2926 // Add a property to a slow-case object.
2927 static void AddSlowProperty(Handle<JSObject> object, 2927 static void AddSlowProperty(Handle<JSObject> object,
2928 Handle<Name> name, 2928 Handle<Name> name,
2929 Handle<Object> value, 2929 Handle<Object> value,
2930 PropertyAttributes attributes); 2930 PropertyAttributes attributes);
2931 2931
2932 static Handle<Object> DeleteProperty(Handle<JSObject> object, 2932 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
2933 Handle<Name> name, 2933 Handle<JSObject> object,
2934 DeleteMode mode); 2934 Handle<Name> name,
2935 DeleteMode mode);
2935 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object, 2936 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object,
2936 Handle<Name> name, 2937 Handle<Name> name,
2937 DeleteMode mode); 2938 DeleteMode mode);
2938 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object, 2939 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object,
2939 Handle<Name> name); 2940 Handle<Name> name);
2940 2941
2941 // Deletes the named property in a normalized object. 2942 // Deletes the named property in a normalized object.
2942 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object, 2943 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object,
2943 Handle<Name> name, 2944 Handle<Name> name,
2944 DeleteMode mode); 2945 DeleteMode mode);
2945 2946
2946 static Handle<Object> DeleteElement(Handle<JSObject> object, 2947 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
2947 uint32_t index, 2948 Handle<JSObject> object,
2948 DeleteMode mode); 2949 uint32_t index,
2949 static Handle<Object> DeleteElementWithInterceptor(Handle<JSObject> object, 2950 DeleteMode mode);
2950 uint32_t index); 2951 MUST_USE_RESULT static MaybeHandle<Object> DeleteElementWithInterceptor(
2952 Handle<JSObject> object,
2953 uint32_t index);
2951 2954
2952 bool ReferencesObjectFromElements(FixedArray* elements, 2955 bool ReferencesObjectFromElements(FixedArray* elements,
2953 ElementsKind kind, 2956 ElementsKind kind,
2954 Object* object); 2957 Object* object);
2955 2958
2956 // Returns true if most of the elements backing storage is used. 2959 // Returns true if most of the elements backing storage is used.
2957 bool HasDenseElements(); 2960 bool HasDenseElements();
2958 2961
2959 // Gets the current elements capacity and the number of used elements. 2962 // Gets the current elements capacity and the number of used elements.
2960 void GetElementsCapacityAndUsage(int* capacity, int* used); 2963 void GetElementsCapacityAndUsage(int* capacity, int* used);
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
3975 // Set the details for entry. 3978 // Set the details for entry.
3976 void DetailsAtPut(int entry, PropertyDetails value) { 3979 void DetailsAtPut(int entry, PropertyDetails value) {
3977 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi()); 3980 this->set(HashTable<Shape, Key>::EntryToIndex(entry) + 2, value.AsSmi());
3978 } 3981 }
3979 3982
3980 // Sorting support 3983 // Sorting support
3981 void CopyValuesTo(FixedArray* elements); 3984 void CopyValuesTo(FixedArray* elements);
3982 3985
3983 // Delete a property from the dictionary. 3986 // Delete a property from the dictionary.
3984 Object* DeleteProperty(int entry, JSObject::DeleteMode mode); 3987 Object* DeleteProperty(int entry, JSObject::DeleteMode mode);
3988 // TODO(ishell): Temporary wrapper until handlified.
3989 static Handle<Object> DeleteProperty(
3990 Handle<Dictionary<Shape, Key> > dictionary,
3991 int entry,
3992 JSObject::DeleteMode mode);
3985 3993
3986 // Attempt to shrink the dictionary after deletion of key. 3994 // Attempt to shrink the dictionary after deletion of key.
3987 MUST_USE_RESULT MaybeObject* Shrink(Key key); 3995 MUST_USE_RESULT MaybeObject* Shrink(Key key);
3996 // TODO(ishell): Temporary wrapper until handlified.
3997 MUST_USE_RESULT static Handle<FixedArray> Shrink(
3998 Handle<Dictionary<Shape, Key> > dictionary,
3999 Key key);
3988 4000
3989 // Returns the number of elements in the dictionary filtering out properties 4001 // Returns the number of elements in the dictionary filtering out properties
3990 // with the specified attributes. 4002 // with the specified attributes.
3991 int NumberOfElementsFilterAttributes(PropertyAttributes filter); 4003 int NumberOfElementsFilterAttributes(PropertyAttributes filter);
3992 4004
3993 // Returns the number of enumerable elements in the dictionary. 4005 // Returns the number of enumerable elements in the dictionary.
3994 int NumberOfEnumElements(); 4006 int NumberOfEnumElements();
3995 4007
3996 enum SortMode { UNSORTED, SORTED }; 4008 enum SortMode { UNSORTED, SORTED };
3997 // Copies keys to preallocated fixed array. 4009 // Copies keys to preallocated fixed array.
(...skipping 7008 matching lines...) Expand 10 before | Expand all | Expand 10 after
11006 } else { 11018 } else {
11007 value &= ~(1 << bit_position); 11019 value &= ~(1 << bit_position);
11008 } 11020 }
11009 return value; 11021 return value;
11010 } 11022 }
11011 }; 11023 };
11012 11024
11013 } } // namespace v8::internal 11025 } } // namespace v8::internal
11014 11026
11015 #endif // V8_OBJECTS_H_ 11027 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698