Changeset 270550 in webkit


Ignore:
Timestamp:
Dec 8, 2020 12:15:14 PM (20 months ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Enable "at" methods
https://bugs.webkit.org/show_bug.cgi?id=219631

Reviewed by Ross Kirsling.

Source/JavaScriptCore:

This patch enables "at" methods in Array, String, and %TypedArray% by flipping runtime flag.

  • runtime/OptionsList.h:

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/array-unscopables-properties-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
  • js/script-tests/array-unscopables-properties.js:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r270532 r270550  
     12020-12-08  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Enable "at" methods
     4        https://bugs.webkit.org/show_bug.cgi?id=219631
     5
     6        Reviewed by Ross Kirsling.
     7
     8        * js/Object-getOwnPropertyNames-expected.txt:
     9        * js/array-unscopables-properties-expected.txt:
     10        * js/script-tests/Object-getOwnPropertyNames.js:
     11        * js/script-tests/array-unscopables-properties.js:
     12
    1132020-12-08  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt

    r268760 r270550  
    8686    includes
    8787    copyWithin
     88    at
    8889    constructor
    8990    Symbol(Symbol.iterator)
     
    139140    includes
    140141    copyWithin
     142    at
    141143    constructor
    142144    Symbol(Symbol.iterator)
     
    177179    includes
    178180    copyWithin
     181    at
    179182    constructor
    180183    Symbol(Symbol.iterator)
     
    215218    includes
    216219    copyWithin
     220    at
    217221    constructor
    218222    Symbol(Symbol.iterator)
  • trunk/LayoutTests/js/Object-getOwnPropertyNames-expected.txt

    r268760 r270550  
    4848PASS getSortedOwnPropertyNames(Function.prototype) is ['apply', 'arguments', 'bind', 'call', 'caller', 'constructor', 'length', 'name', 'toString']
    4949PASS getSortedOwnPropertyNames(Array) is ['from', 'isArray', 'length', 'name', 'of', 'prototype']
    50 PASS getSortedOwnPropertyNames(Array.prototype) is ['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']
     50PASS getSortedOwnPropertyNames(Array.prototype) is ['at', 'concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']
    5151PASS getSortedOwnPropertyNames(String) is ['fromCharCode', 'fromCodePoint', 'length', 'name', 'prototype', 'raw']
    52 PASS getSortedOwnPropertyNames(String.prototype) is ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']
     52PASS getSortedOwnPropertyNames(String.prototype) is ['anchor', 'at', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']
    5353PASS getSortedOwnPropertyNames(Boolean) is ['length', 'name', 'prototype']
    5454PASS getSortedOwnPropertyNames(Boolean.prototype) is ['constructor', 'toString', 'valueOf']
  • trunk/LayoutTests/js/array-unscopables-properties-expected.txt

    r268760 r270550  
    1111PASS Object.getOwnPropertyNames(Array.prototype[Symbol.unscopables]) is expectedEntries
    1212PASS Object.getOwnPropertySymbols(Array.prototype[Symbol.unscopables]) is []
     13PASS Array.prototype[Symbol.unscopables]["at"] is true
     14PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "at").writable is true
     15PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "at").enumerable is true
     16PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "at").configurable is true
    1317PASS Array.prototype[Symbol.unscopables]["copyWithin"] is true
    1418PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "copyWithin").writable is true
  • trunk/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js

    r268760 r270550  
    5757    "Function.prototype": "['apply', 'arguments', 'bind', 'call', 'caller', 'constructor', 'length', 'name', 'toString']",
    5858    "Array": "['from', 'isArray', 'length', 'name', 'of', 'prototype']",
    59     "Array.prototype": "['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']",
     59    "Array.prototype": "['at', 'concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']",
    6060    "String": "['fromCharCode', 'fromCodePoint', 'length', 'name', 'prototype', 'raw']",
    61     "String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']",
     61    "String.prototype": "['anchor', 'at', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']",
    6262    "Boolean": "['length', 'name', 'prototype']",
    6363    "Boolean.prototype": "['constructor', 'toString', 'valueOf']",
  • trunk/LayoutTests/js/script-tests/array-unscopables-properties.js

    r268760 r270550  
    88
    99let expectedEntries = [
     10    "at",
    1011    "copyWithin",
    1112    "entries",
  • trunk/Source/JavaScriptCore/ChangeLog

    r270537 r270550  
     12020-12-08  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Enable "at" methods
     4        https://bugs.webkit.org/show_bug.cgi?id=219631
     5
     6        Reviewed by Ross Kirsling.
     7
     8        This patch enables "at" methods in Array, String, and %TypedArray% by flipping runtime flag.
     9
     10        * runtime/OptionsList.h:
     11
    1122020-12-08  Caio Lima  <ticaiolima@gmail.com>
    213
  • trunk/Source/JavaScriptCore/runtime/OptionsList.h

    r270208 r270550  
    496496    v(Bool, useIntlDateTimeFormatDayPeriod, true, Normal, "Expose the Intl.DateTimeFormat dayPeriod feature.") \
    497497    v(Bool, useIntlDateTimeFormatRangeToParts, true, Normal, "Expose the Intl.DateTimeFormat#formatRangeToParts feature.") \
    498     v(Bool, useAtMethod, false, Normal, "Expose the at() method on Array and %TypedArray%.") \
     498    v(Bool, useAtMethod, true, Normal, "Expose the at() method on Array, %TypedArray%, and String.") \
    499499    v(Bool, useSharedArrayBuffer, false, Normal, nullptr) \
    500500    v(Bool, useArrayAllocationProfiling, true, Normal, "If true, we will use our normal array allocation profiling. If false, the allocation profile will always claim to be undecided.") \
Note: See TracChangeset for help on using the changeset viewer.