Implement ES6 String.prototype.repeat(count)
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 19:33:19 +0000 (19:33 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 19:33:19 +0000 (19:33 +0000)
commit907b097513bdec1ef42ad481db0b0ad25257cfae
tree79c3fb6c580f952576dc8af96ebff9002dada5a7
parent87e1c5de3f4f351de64a67bb53c2ac1f7bdefe3e
Implement ES6 String.prototype.repeat(count)
https://bugs.webkit.org/show_bug.cgi?id=140047

Reviewed by Darin Adler.

Source/JavaScriptCore:

Introducing ES6 String.prototype.repeat(count) function.

* runtime/JSString.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::repeatSmallString):
(JSC::stringProtoFuncRepeat):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/string-repeat.js: Added.
(stringRepeated.toString):
(count.valueOf):
* js/string-repeat-expected.txt: Added.
* js/string-repeat.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/Object-getOwnPropertyNames-expected.txt
LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
LayoutTests/js/script-tests/string-repeat.js [new file with mode: 0644]
LayoutTests/js/string-repeat-expected.txt [new file with mode: 0644]
LayoutTests/js/string-repeat.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/StringPrototype.cpp