[JSC] Implement item method proposal
Created attachment 410083 [details] Patch
Created attachment 410087 [details] Patch
Comment on attachment 410087 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410087&action=review > Source/JavaScriptCore/builtins/StringPrototype.js:358 > +function item(index) > +{ > + "use strict"; > + > + if (@isUndefinedOrNull(this)) > + @throwTypeError("String.prototype.item requires that |this| not be null or undefined"); > + > + var string = @toString(this); > + var length = string.length; > + > + var k = @toInteger(index); > + if (k < 0) > + k += length; > + > + return (k >= 0 && k < length) ? string[k] : @undefined; > +} Can you file a bug making String#item accelerated like String#charAt? And can you add FIXME to that bug here? I think item and charAt are super similar.
Created attachment 410144 [details] Patch for landing
Found 1 new test failure: inspector/console/queryHolders.html
Created attachment 410172 [details] Patch for landing
Committed r267814: <https://trac.webkit.org/changeset/267814> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410144 [details].
<rdar://problem/69816255>