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

Side by Side Diff: src/objects.h

Issue 8256015: Implement for-in loop for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Activate test cases that relied on for-in. Created 9 years, 2 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); 1344 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode);
1345 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); 1345 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode);
1346 1346
1347 // Set the index'th array element. 1347 // Set the index'th array element.
1348 // Can cause GC, or return failure if GC is required. 1348 // Can cause GC, or return failure if GC is required.
1349 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, 1349 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index,
1350 Object* value, 1350 Object* value,
1351 StrictModeFlag strict_mode, 1351 StrictModeFlag strict_mode,
1352 bool check_prototype); 1352 bool check_prototype);
1353 1353
1354 // Tests for the fast common case for property enumeration.
1355 bool IsSimpleEnum();
1356
1354 // Returns the class name ([[Class]] property in the specification). 1357 // Returns the class name ([[Class]] property in the specification).
1355 String* class_name(); 1358 String* class_name();
1356 1359
1357 // Returns the constructor name (the name (possibly, inferred name) of the 1360 // Returns the constructor name (the name (possibly, inferred name) of the
1358 // function that was used to instantiate the object). 1361 // function that was used to instantiate the object).
1359 String* constructor_name(); 1362 String* constructor_name();
1360 1363
1361 inline PropertyAttributes GetPropertyAttribute(String* name); 1364 inline PropertyAttributes GetPropertyAttribute(String* name);
1362 PropertyAttributes GetPropertyAttributeWithReceiver(JSReceiver* receiver, 1365 PropertyAttributes GetPropertyAttributeWithReceiver(JSReceiver* receiver,
1363 String* name); 1366 String* name);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 void DeleteHiddenProperty(String* key); 1599 void DeleteHiddenProperty(String* key);
1597 // Returns true if the object has a property with the hidden symbol as name. 1600 // Returns true if the object has a property with the hidden symbol as name.
1598 bool HasHiddenProperties(); 1601 bool HasHiddenProperties();
1599 1602
1600 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); 1603 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag);
1601 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag); 1604 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag);
1602 1605
1603 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); 1606 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode);
1604 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); 1607 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode);
1605 1608
1606 // Tests for the fast common case for property enumeration.
1607 bool IsSimpleEnum();
1608
1609 inline void ValidateSmiOnlyElements(); 1609 inline void ValidateSmiOnlyElements();
1610 1610
1611 // Makes sure that this object can contain non-smi Object as elements. 1611 // Makes sure that this object can contain non-smi Object as elements.
1612 inline MaybeObject* EnsureCanContainNonSmiElements(); 1612 inline MaybeObject* EnsureCanContainNonSmiElements();
1613 1613
1614 // Makes sure that this object can contain the specified elements. 1614 // Makes sure that this object can contain the specified elements.
1615 inline MaybeObject* EnsureCanContainElements(Object** elements, 1615 inline MaybeObject* EnsureCanContainElements(Object** elements,
1616 uint32_t count); 1616 uint32_t count);
1617 inline MaybeObject* EnsureCanContainElements(FixedArray* elements); 1617 inline MaybeObject* EnsureCanContainElements(FixedArray* elements);
1618 MaybeObject* EnsureCanContainElements(Arguments* arguments, 1618 MaybeObject* EnsureCanContainElements(Arguments* arguments,
(...skipping 5974 matching lines...) Expand 10 before | Expand all | Expand 10 after
7593 } else { 7593 } else {
7594 value &= ~(1 << bit_position); 7594 value &= ~(1 << bit_position);
7595 } 7595 }
7596 return value; 7596 return value;
7597 } 7597 }
7598 }; 7598 };
7599 7599
7600 } } // namespace v8::internal 7600 } } // namespace v8::internal
7601 7601
7602 #endif // V8_OBJECTS_H_ 7602 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698