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

Side by Side Diff: src/objects.h

Issue 6526046: Handle indexed properties on value objects correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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/arguments.h ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 bool check_prototype = true); 1539 bool check_prototype = true);
1540 1540
1541 // Set the index'th array element. 1541 // Set the index'th array element.
1542 // A Failure object is returned if GC is needed. 1542 // A Failure object is returned if GC is needed.
1543 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, 1543 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index,
1544 Object* value, 1544 Object* value,
1545 bool check_prototype = true); 1545 bool check_prototype = true);
1546 1546
1547 // Returns the index'th element. 1547 // Returns the index'th element.
1548 // The undefined object if index is out of bounds. 1548 // The undefined object if index is out of bounds.
1549 MaybeObject* GetElementWithReceiver(JSObject* receiver, uint32_t index); 1549 MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index);
1550 MaybeObject* GetElementWithInterceptor(JSObject* receiver, uint32_t index); 1550 MaybeObject* GetElementWithInterceptor(Object* receiver, uint32_t index);
1551 1551
1552 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity, 1552 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity,
1553 int length); 1553 int length);
1554 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length); 1554 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length);
1555 1555
1556 // Lookup interceptors are used for handling properties controlled by host 1556 // Lookup interceptors are used for handling properties controlled by host
1557 // objects. 1557 // objects.
1558 inline bool HasNamedInterceptor(); 1558 inline bool HasNamedInterceptor();
1559 inline bool HasIndexedInterceptor(); 1559 inline bool HasIndexedInterceptor();
1560 1560
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 Object* value, 1797 Object* value,
1798 JSObject* holder); 1798 JSObject* holder);
1799 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index, 1799 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index,
1800 Object* value, 1800 Object* value,
1801 bool check_prototype); 1801 bool check_prototype);
1802 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor( 1802 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(
1803 uint32_t index, 1803 uint32_t index,
1804 Object* value, 1804 Object* value,
1805 bool check_prototype); 1805 bool check_prototype);
1806 1806
1807 MaybeObject* GetElementPostInterceptor(JSObject* receiver, uint32_t index); 1807 MaybeObject* GetElementPostInterceptor(Object* receiver, uint32_t index);
1808 1808
1809 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, 1809 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name,
1810 DeleteMode mode); 1810 DeleteMode mode);
1811 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); 1811 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name);
1812 1812
1813 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index, 1813 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index,
1814 DeleteMode mode); 1814 DeleteMode mode);
1815 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); 1815 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index);
1816 1816
1817 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver, 1817 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver,
(...skipping 4735 matching lines...) Expand 10 before | Expand all | Expand 10 after
6553 } else { 6553 } else {
6554 value &= ~(1 << bit_position); 6554 value &= ~(1 << bit_position);
6555 } 6555 }
6556 return value; 6556 return value;
6557 } 6557 }
6558 }; 6558 };
6559 6559
6560 } } // namespace v8::internal 6560 } } // namespace v8::internal
6561 6561
6562 #endif // V8_OBJECTS_H_ 6562 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/arguments.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698