Changeset 171390 in webkit for trunk/Source/JavaScriptCore/tests

Timestamp:
Jul 22, 2014, 9:18:35 PM (11 years ago)
Author:
[email protected]
Message:

Array.concat() should work on runtime arrays too.
<https://webkit.org/b/135179>

Reviewed by Geoffrey Garen.

  • jsc.cpp:

(WTF::RuntimeArray::create):
(WTF::RuntimeArray::~RuntimeArray):
(WTF::RuntimeArray::destroy):
(WTF::RuntimeArray::getOwnPropertySlot):
(WTF::RuntimeArray::getOwnPropertySlotByIndex):
(WTF::RuntimeArray::put):
(WTF::RuntimeArray::deleteProperty):
(WTF::RuntimeArray::getLength):
(WTF::RuntimeArray::createPrototype):
(WTF::RuntimeArray::createStructure):
(WTF::RuntimeArray::finishCreation):
(WTF::RuntimeArray::RuntimeArray):
(WTF::RuntimeArray::lengthGetter):
(GlobalObject::finishCreation):
(functionCreateRuntimeArray):

  • Added support to create a runtime array for testing purpose.
  • runtime/ArrayPrototype.cpp:

(JSC::getLength):

  • Added fast case for when the array object is a JSArray.

(JSC::arrayProtoFuncJoin):

  • Added a needed but missing exception check.

(JSC::arrayProtoFuncConcat):

  • Use getLength() to compute the array length instead of assuming that the array is a JSArray instance.
  • tests/stress/regexp-matches-array.js: Added.

(testArrayConcat):

  • tests/stress/runtime-array.js: Added.

(testArrayConcat):

Location:
trunk/Source/JavaScriptCore/tests/stress
Files:
2 added

Note: See TracChangeset for help on using the changeset viewer.