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

Side by Side Diff: src/objects.h

Issue 3462005: Fix getOwnPropertyDescriptor() support for index properties. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | 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 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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 1410
1411 // Return the object's prototype (might be Heap::null_value()). 1411 // Return the object's prototype (might be Heap::null_value()).
1412 inline Object* GetPrototype(); 1412 inline Object* GetPrototype();
1413 1413
1414 // Set the object's prototype (only JSObject and null are allowed). 1414 // Set the object's prototype (only JSObject and null are allowed).
1415 Object* SetPrototype(Object* value, bool skip_hidden_prototypes); 1415 Object* SetPrototype(Object* value, bool skip_hidden_prototypes);
1416 1416
1417 // Tells whether the index'th element is present. 1417 // Tells whether the index'th element is present.
1418 inline bool HasElement(uint32_t index); 1418 inline bool HasElement(uint32_t index);
1419 bool HasElementWithReceiver(JSObject* receiver, uint32_t index); 1419 bool HasElementWithReceiver(JSObject* receiver, uint32_t index);
1420 bool HasLocalElement(uint32_t index); 1420
1421 // Tells whether the index'th element is present and how it is stored.
1422 enum LocalElementType {
1423 // There is no element with given index.
1424 UNDEFINED_ELEMENT,
1425
1426 // Element with given index is handled by interceptor.
1427 INTERCEPTED_ELEMENT,
1428
1429 // Element with given index is character in string.
1430 STRING_CHARACTER_ELEMENT,
1431
1432 // Element with given index is stored in fast backing store.
1433 FAST_ELEMENT,
1434
1435 // Element with given index is stored in slow backing store.
1436 DICTIONARY_ELEMENT
1437 };
1438
1439 LocalElementType HasLocalElement(uint32_t index);
1421 1440
1422 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); 1441 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index);
1423 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); 1442 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index);
1424 1443
1425 MUST_USE_RESULT Object* SetFastElement(uint32_t index, Object* value); 1444 MUST_USE_RESULT Object* SetFastElement(uint32_t index, Object* value);
1426 1445
1427 // Set the index'th array element. 1446 // Set the index'th array element.
1428 // A Failure object is returned if GC is needed. 1447 // A Failure object is returned if GC is needed.
1429 MUST_USE_RESULT Object* SetElement(uint32_t index, Object* value); 1448 MUST_USE_RESULT Object* SetElement(uint32_t index, Object* value);
1430 1449
(...skipping 4140 matching lines...) Expand 10 before | Expand all | Expand 10 after
5571 } else { 5590 } else {
5572 value &= ~(1 << bit_position); 5591 value &= ~(1 << bit_position);
5573 } 5592 }
5574 return value; 5593 return value;
5575 } 5594 }
5576 }; 5595 };
5577 5596
5578 } } // namespace v8::internal 5597 } } // namespace v8::internal
5579 5598
5580 #endif // V8_OBJECTS_H_ 5599 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698