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

Side by Side Diff: src/objects.h

Issue 118374: Introduce an API to force the deletion of a property ignoring... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/ia32/macro-assembler-ia32.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 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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 1268
1269 bool HasProperty(String* name) { 1269 bool HasProperty(String* name) {
1270 return GetPropertyAttribute(name) != ABSENT; 1270 return GetPropertyAttribute(name) != ABSENT;
1271 } 1271 }
1272 1272
1273 // Can cause a GC if it hits an interceptor. 1273 // Can cause a GC if it hits an interceptor.
1274 bool HasLocalProperty(String* name) { 1274 bool HasLocalProperty(String* name) {
1275 return GetLocalPropertyAttribute(name) != ABSENT; 1275 return GetLocalPropertyAttribute(name) != ABSENT;
1276 } 1276 }
1277 1277
1278 Object* DeleteProperty(String* name); 1278 enum DeleteMode { NORMAL_DELETION, FORCE_DELETION };
1279 Object* DeleteElement(uint32_t index); 1279 Object* DeleteProperty(String* name, DeleteMode mode);
1280 Object* DeleteLazyProperty(LookupResult* result, String* name); 1280 Object* DeleteElement(uint32_t index, DeleteMode mode);
1281 Object* DeleteLazyProperty(LookupResult* result,
1282 String* name,
1283 DeleteMode mode);
1281 1284
1282 // Tests for the fast common case for property enumeration. 1285 // Tests for the fast common case for property enumeration.
1283 bool IsSimpleEnum(); 1286 bool IsSimpleEnum();
1284 1287
1285 // Do we want to keep the elements in fast case when increasing the 1288 // Do we want to keep the elements in fast case when increasing the
1286 // capacity? 1289 // capacity?
1287 bool ShouldConvertToSlowElements(int new_capacity); 1290 bool ShouldConvertToSlowElements(int new_capacity);
1288 // Returns true if the backing storage for the slow-case elements of 1291 // Returns true if the backing storage for the slow-case elements of
1289 // this object takes up nearly as much space as a fast-case backing 1292 // this object takes up nearly as much space as a fast-case backing
1290 // storage would. In that case the JSObject should have fast 1293 // storage would. In that case the JSObject should have fast
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 static const int kHeaderSize = kElementsOffset + kPointerSize; 1515 static const int kHeaderSize = kElementsOffset + kPointerSize;
1513 1516
1514 Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index); 1517 Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index);
1515 1518
1516 private: 1519 private:
1517 Object* SetElementWithInterceptor(uint32_t index, Object* value); 1520 Object* SetElementWithInterceptor(uint32_t index, Object* value);
1518 Object* SetElementPostInterceptor(uint32_t index, Object* value); 1521 Object* SetElementPostInterceptor(uint32_t index, Object* value);
1519 1522
1520 Object* GetElementPostInterceptor(JSObject* receiver, uint32_t index); 1523 Object* GetElementPostInterceptor(JSObject* receiver, uint32_t index);
1521 1524
1522 Object* DeletePropertyPostInterceptor(String* name); 1525 Object* DeletePropertyPostInterceptor(String* name, DeleteMode mode);
1523 Object* DeletePropertyWithInterceptor(String* name); 1526 Object* DeletePropertyWithInterceptor(String* name);
1524 1527
1525 Object* DeleteElementPostInterceptor(uint32_t index); 1528 Object* DeleteElementPostInterceptor(uint32_t index, DeleteMode mode);
1526 Object* DeleteElementWithInterceptor(uint32_t index); 1529 Object* DeleteElementWithInterceptor(uint32_t index);
1527 1530
1528 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver, 1531 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver,
1529 String* name, 1532 String* name,
1530 bool continue_search); 1533 bool continue_search);
1531 PropertyAttributes GetPropertyAttributeWithInterceptor(JSObject* receiver, 1534 PropertyAttributes GetPropertyAttributeWithInterceptor(JSObject* receiver,
1532 String* name, 1535 String* name,
1533 bool continue_search); 1536 bool continue_search);
1534 PropertyAttributes GetPropertyAttributeWithFailedAccessCheck( 1537 PropertyAttributes GetPropertyAttributeWithFailedAccessCheck(
1535 Object* receiver, 1538 Object* receiver,
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 // Casting. 2053 // Casting.
2051 static inline Dictionary* cast(Object* obj); 2054 static inline Dictionary* cast(Object* obj);
2052 2055
2053 // Find entry for string key otherwise return -1. 2056 // Find entry for string key otherwise return -1.
2054 int FindStringEntry(String* key); 2057 int FindStringEntry(String* key);
2055 2058
2056 // Find entry for number key otherwise return -1. 2059 // Find entry for number key otherwise return -1.
2057 int FindNumberEntry(uint32_t index); 2060 int FindNumberEntry(uint32_t index);
2058 2061
2059 // Delete a property from the dictionary. 2062 // Delete a property from the dictionary.
2060 Object* DeleteProperty(int entry); 2063 Object* DeleteProperty(int entry, JSObject::DeleteMode mode);
2061 2064
2062 // Type specific at put (default NONE attributes is used when adding). 2065 // Type specific at put (default NONE attributes is used when adding).
2063 Object* AtStringPut(String* key, Object* value); 2066 Object* AtStringPut(String* key, Object* value);
2064 Object* AtNumberPut(uint32_t key, Object* value); 2067 Object* AtNumberPut(uint32_t key, Object* value);
2065 2068
2066 Object* AddStringEntry(String* key, Object* value, PropertyDetails details); 2069 Object* AddStringEntry(String* key, Object* value, PropertyDetails details);
2067 Object* AddNumberEntry(uint32_t key, Object* value, PropertyDetails details); 2070 Object* AddNumberEntry(uint32_t key, Object* value, PropertyDetails details);
2068 2071
2069 // Set an existing entry or add a new one if needed. 2072 // Set an existing entry or add a new one if needed.
2070 Object* SetOrAddStringEntry(String* key, 2073 Object* SetOrAddStringEntry(String* key,
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 // Bit positions for bit field. 2624 // Bit positions for bit field.
2622 static const int kUnused = 0; // To be used for marking recently used maps. 2625 static const int kUnused = 0; // To be used for marking recently used maps.
2623 static const int kHasNonInstancePrototype = 1; 2626 static const int kHasNonInstancePrototype = 1;
2624 static const int kIsHiddenPrototype = 2; 2627 static const int kIsHiddenPrototype = 2;
2625 static const int kHasNamedInterceptor = 3; 2628 static const int kHasNamedInterceptor = 3;
2626 static const int kHasIndexedInterceptor = 4; 2629 static const int kHasIndexedInterceptor = 4;
2627 static const int kIsUndetectable = 5; 2630 static const int kIsUndetectable = 5;
2628 static const int kHasInstanceCallHandler = 6; 2631 static const int kHasInstanceCallHandler = 6;
2629 static const int kIsAccessCheckNeeded = 7; 2632 static const int kIsAccessCheckNeeded = 7;
2630 2633
2631 // Bit positions for but field 2 2634 // Bit positions for bit field 2
2632 static const int kNeedsLoading = 0; 2635 static const int kNeedsLoading = 0;
2633 2636
2634 private: 2637 private:
2635 DISALLOW_IMPLICIT_CONSTRUCTORS(Map); 2638 DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
2636 }; 2639 };
2637 2640
2638 2641
2639 // An abstract superclass, a marker class really, for simple structure classes. 2642 // An abstract superclass, a marker class really, for simple structure classes.
2640 // It doesn't carry much functionality but allows struct classes to me 2643 // It doesn't carry much functionality but allows struct classes to me
2641 // identified in the type system. 2644 // identified in the type system.
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
4424 } else { 4427 } else {
4425 value &= ~(1 << bit_position); 4428 value &= ~(1 << bit_position);
4426 } 4429 }
4427 return value; 4430 return value;
4428 } 4431 }
4429 }; 4432 };
4430 4433
4431 } } // namespace v8::internal 4434 } } // namespace v8::internal
4432 4435
4433 #endif // V8_OBJECTS_H_ 4436 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698