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

Unified Diff: src/objects.h

Issue 3274008: Get gcc to check that we don't ignore return values of functions that can... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/liveedit.cc ('k') | src/objects.cc » ('j') | src/utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 5365)
+++ src/objects.h (working copy)
@@ -1275,7 +1275,7 @@
Object* PrepareElementsForSort(uint32_t limit);
// As PrepareElementsForSort, but only on objects where elements is
// a dictionary, and it will stay a dictionary.
- Object* PrepareSlowElementsForSort(uint32_t limit);
+ NOIGNORE Object* PrepareSlowElementsForSort(uint32_t limit);
Object* SetProperty(String* key,
Object* value,
@@ -1313,12 +1313,12 @@
// Sets the property value in a normalized object given (key, value, details).
// Handles the special representation of JS global objects.
- Object* SetNormalizedProperty(String* name,
- Object* value,
- PropertyDetails details);
+ NOIGNORE Object* SetNormalizedProperty(String* name,
+ Object* value,
+ PropertyDetails details);
// Deletes the named property in a normalized object.
- Object* DeleteNormalizedProperty(String* name, DeleteMode mode);
+ NOIGNORE Object* DeleteNormalizedProperty(String* name, DeleteMode mode);
// Returns the class name ([[Class]] property in the specification).
String* class_name();
@@ -1336,11 +1336,13 @@
String* name);
PropertyAttributes GetLocalPropertyAttribute(String* name);
- Object* DefineAccessor(String* name, bool is_getter, JSFunction* fun,
- PropertyAttributes attributes);
+ NOIGNORE Object* DefineAccessor(String* name,
+ bool is_getter,
+ JSFunction* fun,
+ PropertyAttributes attributes);
Object* LookupAccessor(String* name, bool is_getter);
- Object* DefineAccessor(AccessorInfo* info);
+ NOIGNORE Object* DefineAccessor(AccessorInfo* info);
// Used from Object::GetProperty().
Object* GetPropertyWithFailedAccessCheck(Object* receiver,
@@ -1391,8 +1393,8 @@
inline Object* GetHiddenPropertiesObject();
inline Object* SetHiddenPropertiesObject(Object* hidden_obj);
- Object* DeleteProperty(String* name, DeleteMode mode);
- Object* DeleteElement(uint32_t index, DeleteMode mode);
+ NOIGNORE Object* DeleteProperty(String* name, DeleteMode mode);
+ NOIGNORE Object* DeleteElement(uint32_t index, DeleteMode mode);
// Tests for the fast common case for property enumeration.
bool IsSimpleEnum();
@@ -1420,19 +1422,19 @@
bool HasElementWithInterceptor(JSObject* receiver, uint32_t index);
bool HasElementPostInterceptor(JSObject* receiver, uint32_t index);
- Object* SetFastElement(uint32_t index, Object* value);
+ NOIGNORE Object* SetFastElement(uint32_t index, Object* value);
// Set the index'th array element.
// A Failure object is returned if GC is needed.
- Object* SetElement(uint32_t index, Object* value);
+ NOIGNORE Object* SetElement(uint32_t index, Object* value);
// Returns the index'th element.
// The undefined object if index is out of bounds.
Object* GetElementWithReceiver(JSObject* receiver, uint32_t index);
Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index);
- Object* SetFastElementsCapacityAndLength(int capacity, int length);
- Object* SetSlowElements(Object* length);
+ NOIGNORE Object* SetFastElementsCapacityAndLength(int capacity, int length);
+ NOIGNORE Object* SetSlowElements(Object* length);
// Lookup interceptors are used for handling properties controlled by host
// objects.
@@ -1445,7 +1447,7 @@
bool HasRealNamedCallbackProperty(String* key);
// Initializes the array to a certain length
- Object* SetElementsLength(Object* length);
+ NOIGNORE Object* SetElementsLength(Object* length);
// Get the header size for a JSObject. Used to compute the index of
// internal fields as well as the number of internal fields.
@@ -1582,7 +1584,7 @@
static inline JSObject* cast(Object* obj);
// Disalow further properties to be added to the object.
- Object* PreventExtensions();
+ NOIGNORE Object* PreventExtensions();
// Dispatched behavior.
@@ -1655,16 +1657,17 @@
uint32_t index,
Object* value,
JSObject* holder);
- Object* SetElementWithInterceptor(uint32_t index, Object* value);
- Object* SetElementWithoutInterceptor(uint32_t index, Object* value);
+ NOIGNORE Object* SetElementWithInterceptor(uint32_t index, Object* value);
+ NOIGNORE Object* SetElementWithoutInterceptor(uint32_t index, Object* value);
Object* GetElementPostInterceptor(JSObject* receiver, uint32_t index);
- Object* DeletePropertyPostInterceptor(String* name, DeleteMode mode);
- Object* DeletePropertyWithInterceptor(String* name);
+ NOIGNORE Object* DeletePropertyPostInterceptor(String* name, DeleteMode mode);
+ NOIGNORE Object* DeletePropertyWithInterceptor(String* name);
- Object* DeleteElementPostInterceptor(uint32_t index, DeleteMode mode);
- Object* DeleteElementWithInterceptor(uint32_t index);
+ NOIGNORE Object* DeleteElementPostInterceptor(uint32_t index,
+ DeleteMode mode);
+ NOIGNORE Object* DeleteElementWithInterceptor(uint32_t index);
PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver,
String* name,
@@ -1686,13 +1689,14 @@
bool HasDenseElements();
bool CanSetCallback(String* name);
- Object* SetElementCallback(uint32_t index,
- Object* structure,
- PropertyAttributes attributes);
- Object* SetPropertyCallback(String* name,
- Object* structure,
- PropertyAttributes attributes);
- Object* DefineGetterSetter(String* name, PropertyAttributes attributes);
+ NOIGNORE Object* SetElementCallback(uint32_t index,
+ Object* structure,
+ PropertyAttributes attributes);
+ NOIGNORE Object* SetPropertyCallback(String* name,
+ Object* structure,
+ PropertyAttributes attributes);
+ NOIGNORE Object* DefineGetterSetter(String* name,
+ PropertyAttributes attributes);
void LookupInDescriptor(String* name, LookupResult* result);
@@ -1731,13 +1735,13 @@
// Copy operations.
inline Object* Copy();
- Object* CopySize(int new_length);
+ NOIGNORE Object* CopySize(int new_length);
// Add the elements of a JSArray to this FixedArray.
- Object* AddKeysFromJSArray(JSArray* array);
+ NOIGNORE Object* AddKeysFromJSArray(JSArray* array);
// Compute the union of this and other.
- Object* UnionOfKeys(FixedArray* other);
+ NOIGNORE Object* UnionOfKeys(FixedArray* other);
// Copy a sub array from the receiver to dest.
void CopyTo(int pos, FixedArray* dest, int dest_pos, int len);
@@ -1876,11 +1880,12 @@
// or null), its enumeration index is kept as is.
// If adding a real property, map transitions must be removed. If adding
// a transition, they must not be removed. All null descriptors are removed.
- Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag);
+ NOIGNORE Object* CopyInsert(Descriptor* descriptor,
+ TransitionFlag transition_flag);
// Remove all transitions. Return a copy of the array with all transitions
// removed, or a Failure object if the new array could not be allocated.
- Object* RemoveTransitions();
+ NOIGNORE Object* RemoveTransitions();
// Sort the instance descriptors by the hash codes of their keys.
void Sort();
@@ -1908,7 +1913,7 @@
// Allocates a DescriptorArray, but returns the singleton
// empty descriptor array object if number_of_descriptors is 0.
- static Object* Allocate(int number_of_descriptors);
+ NOIGNORE static Object* Allocate(int number_of_descriptors);
// Casting.
static inline DescriptorArray* cast(Object* obj);
@@ -2048,8 +2053,8 @@
}
// Returns a new HashTable object. Might return Failure.
- static Object* Allocate(int at_least_space_for,
- PretenureFlag pretenure = NOT_TENURED);
+ NOIGNORE static Object* Allocate(int at_least_space_for,
+ PretenureFlag pretenure = NOT_TENURED);
// Returns the key at entry.
Object* KeyAt(int entry) { return get(EntryToIndex(entry)); }
@@ -2143,7 +2148,7 @@
}
// Ensure enough space for n additional elements.
- Object* EnsureCapacity(int n, Key key);
+ NOIGNORE Object* EnsureCapacity(int n, Key key);
};
@@ -2159,7 +2164,7 @@
virtual uint32_t HashForObject(Object* key) = 0;
// Returns the key object for storing into the hash table.
// If allocations fails a failure object is returned.
- virtual Object* AsObject() = 0;
+ NOIGNORE virtual Object* AsObject() = 0;
// Required.
virtual ~HashTableKey() {}
};
@@ -2175,7 +2180,7 @@
static uint32_t HashForObject(HashTableKey* key, Object* object) {
return key->HashForObject(object);
}
- static Object* AsObject(HashTableKey* key) {
+ NOIGNORE static Object* AsObject(HashTableKey* key) {
return key->AsObject();
}
@@ -2225,7 +2230,7 @@
return key->HashForObject(object);
}
- static Object* AsObject(HashTableKey* key) {
+ NOIGNORE static Object* AsObject(HashTableKey* key) {
return key->AsObject();
}
@@ -2313,7 +2318,7 @@
}
// Returns a new array for dictionary usage. Might return Failure.
- static Object* Allocate(int at_least_space_for);
+ NOIGNORE static Object* Allocate(int at_least_space_for);
// Ensure enough space for n additional elements.
Object* EnsureCapacity(int n, Key key);
@@ -2355,7 +2360,7 @@
static inline bool IsMatch(String* key, Object* other);
static inline uint32_t Hash(String* key);
static inline uint32_t HashForObject(String* key, Object* object);
- static inline Object* AsObject(String* key);
+ NOIGNORE static inline Object* AsObject(String* key);
static const int kPrefixSize = 2;
static const int kEntrySize = 3;
static const bool kIsEnumerable = true;
@@ -2387,7 +2392,7 @@
static inline bool IsMatch(uint32_t key, Object* other);
static inline uint32_t Hash(uint32_t key);
static inline uint32_t HashForObject(uint32_t key, Object* object);
- static inline Object* AsObject(uint32_t key);
+ NOIGNORE static inline Object* AsObject(uint32_t key);
static const int kPrefixSize = 2;
static const int kEntrySize = 3;
static const bool kIsEnumerable = false;
@@ -3153,13 +3158,13 @@
// [stub cache]: contains stubs compiled for this map.
DECL_ACCESSORS(code_cache, Object)
- Object* CopyDropDescriptors();
+ NOIGNORE Object* CopyDropDescriptors();
- Object* CopyNormalized(PropertyNormalizationMode mode);
+ NOIGNORE Object* CopyNormalized(PropertyNormalizationMode mode);
// Returns a copy of the map, with all transitions dropped from the
// instance descriptors.
- Object* CopyDropTransitions();
+ NOIGNORE Object* CopyDropTransitions();
// Returns this map if it has the fast elements bit set, otherwise
// returns a copy of the map, with all transitions dropped from the
@@ -3192,7 +3197,7 @@
inline void ClearCodeCache();
// Update code cache.
- Object* UpdateCodeCache(String* name, Code* code);
+ NOIGNORE Object* UpdateCodeCache(String* name, Code* code);
// Returns the found code or undefined if absent.
Object* FindInCodeCache(String* name, Code::Flags flags);
@@ -3721,7 +3726,7 @@
inline Object* prototype();
inline Object* instance_prototype();
Object* SetInstancePrototype(Object* value);
- Object* SetPrototype(Object* value);
+ NOIGNORE Object* SetPrototype(Object* value);
// After prototype is removed, it will not be created when accessed, and
// [[Construct]] from this function will not be allowed.
@@ -4062,7 +4067,7 @@
return key->HashForObject(object);
}
- static Object* AsObject(HashTableKey* key) {
+ NOIGNORE static Object* AsObject(HashTableKey* key) {
return key->AsObject();
}
@@ -4095,7 +4100,7 @@
DECL_ACCESSORS(normal_type_cache, Object)
// Add the code object to the cache.
- Object* Update(String* name, Code* code);
+ NOIGNORE Object* Update(String* name, Code* code);
// Lookup code object in the cache. Returns code object if found and undefined
// if not.
@@ -4123,8 +4128,8 @@
static const int kSize = kNormalTypeCacheOffset + kPointerSize;
private:
- Object* UpdateDefaultCache(String* name, Code* code);
- Object* UpdateNormalTypeCache(String* name, Code* code);
+ NOIGNORE Object* UpdateDefaultCache(String* name, Code* code);
+ NOIGNORE Object* UpdateNormalTypeCache(String* name, Code* code);
Object* LookupDefaultCache(String* name, Code::Flags flags);
Object* LookupNormalTypeCache(String* name, Code::Flags flags);
@@ -4152,7 +4157,7 @@
return key->HashForObject(object);
}
- static Object* AsObject(HashTableKey* key) {
+ NOIGNORE static Object* AsObject(HashTableKey* key) {
return key->AsObject();
}
@@ -4165,7 +4170,7 @@
HashTableKey*> {
public:
Object* Lookup(String* name, Code::Flags flags);
- Object* Put(String* name, Code* code);
+ NOIGNORE Object* Put(String* name, Code* code);
int GetIndex(String* name, Code::Flags flags);
void RemoveByIndex(int index);
@@ -5032,12 +5037,12 @@
// is set to a smi. This matches the set function on FixedArray.
inline void set_length(Smi* length);
- Object* JSArrayUpdateLengthFromIndex(uint32_t index, Object* value);
+ NOIGNORE Object* JSArrayUpdateLengthFromIndex(uint32_t index, Object* value);
// Initialize the array with the given capacity. The function may
// fail due to out-of-memory situations, but only if the requested
// capacity is non-zero.
- Object* Initialize(int capacity);
+ NOIGNORE Object* Initialize(int capacity);
// Set the content of the array to the content of storage.
inline void SetContent(FixedArray* storage);
« no previous file with comments | « src/liveedit.cc ('k') | src/objects.cc » ('j') | src/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698