Commit 2e353fc3 authored by msaboff@apple.com's avatar msaboff@apple.com

Comment additions after r130109

Rubber stamped by Geoffrey Garen.

Updated comments to how array storage works.

* runtime/ArrayStorage.h:
* runtime/JSArray.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8a730fab
2012-10-02 Michael Saboff <msaboff@apple.com>
Comment additions after r130109
Rubber stamped by Geoffrey Garen.
Updated comments to how array storage works.
* runtime/ArrayStorage.h:
* runtime/JSArray.cpp:
2012-10-01 Mark Hahnenberg <mhahnenberg@apple.com> 2012-10-01 Mark Hahnenberg <mhahnenberg@apple.com>
Block freeing thread should sleep indefinitely when there's no work to do Block freeing thread should sleep indefinitely when there's no work to do
......
...@@ -41,6 +41,8 @@ namespace JSC { ...@@ -41,6 +41,8 @@ namespace JSC {
// setStorage() methods. It is important to note that there may be space before the ArrayStorage that // setStorage() methods. It is important to note that there may be space before the ArrayStorage that
// is used to quick unshift / shift operation. The actual allocated pointer is available by using: // is used to quick unshift / shift operation. The actual allocated pointer is available by using:
// getStorage() - m_indexBias * sizeof(JSValue) // getStorage() - m_indexBias * sizeof(JSValue)
// All slots in ArrayStorage (slots from 0 to vectorLength) are expected to be initialized to a JSValue or,
// for hole slots, JSValue().
struct ArrayStorage { struct ArrayStorage {
WTF_MAKE_NONCOPYABLE(ArrayStorage); WTF_MAKE_NONCOPYABLE(ArrayStorage);
private: private:
......
...@@ -245,7 +245,7 @@ void JSArray::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, Pro ...@@ -245,7 +245,7 @@ void JSArray::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, Pro
JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode); JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
} }
// This method makes room in the vector, but leaves the new space uncleared. // This method makes room in the vector, but leaves the new space for count slots uncleared.
bool JSArray::unshiftCountSlowCase(JSGlobalData& globalData, bool addToFront, unsigned count) bool JSArray::unshiftCountSlowCase(JSGlobalData& globalData, bool addToFront, unsigned count)
{ {
ArrayStorage* storage = ensureArrayStorage(globalData); ArrayStorage* storage = ensureArrayStorage(globalData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment