-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GetOwnProperty for string exotic object #1291
Support GetOwnProperty for string exotic object #1291
Conversation
71e1952
to
eed83aa
Compare
eed83aa
to
8e426f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ask for 2 small changes. I would also ask that you look at the 2 new panics to try to understand what introduced them.
Test262 conformance changes:
Test result | master count | PR count | difference |
---|---|---|---|
Total | 78,873 | 78,873 | 0 |
Passed | 26,665 | 26,717 | +52 |
Ignored | 15,604 | 15,604 | 0 |
Failed | 36,604 | 36,552 | -52 |
Panics | 14 | 16 | +2 |
Conformance | 33.81% | 33.87% | +0.07% |
Fixed tests:
test/language/line-terminators/7.3-5.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-5.js (previously Failed)
test/language/line-terminators/7.3-15.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-15.js (previously Failed)
test/language/line-terminators/7.3-6.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-6.js (previously Failed)
test/harness/decimalToHexString.js [strict mode] (previously Failed)
test/harness/decimalToHexString.js (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js [strict mode] (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js [strict mode] (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js (previously Failed)
test/built-ins/Date/prototype/toISOString/15.9.5.43-0-5.js [strict mode] (previously Failed)
test/built-ins/Date/prototype/toISOString/15.9.5.43-0-5.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js (previously Failed)
test/built-ins/Array/prototype/every/15.4.4.16-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/every/15.4.4.16-2-18.js (previously Failed)
test/built-ins/Array/prototype/some/15.4.4.17-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/some/15.4.4.17-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js (previously Failed)
New panics:
test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-string-wrapper.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-string-wrapper.js (previously Failed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I would just change a couple of things.
Co-authored-by: Iban Eguia <razican@protonmail.ch>
I've managed to fix the new panics, they were caused by emoji character which consists of multiple utf-16 scalar values. v8 in this case just returns string with one of escaped single scalar value(like below) in each index. I've replicated this behaviour in a new commit instead of unwrapping.
P.S. Similar issue exists in string builtin method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Let's see the test results :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numbers look great now.
Test262 conformance changes:
Test result | master count | PR count | difference |
---|---|---|---|
Total | 78,873 | 78,873 | 0 |
Passed | 26,667 | 26,719 | +52 |
Ignored | 15,604 | 15,604 | 0 |
Failed | 36,602 | 36,550 | -52 |
Panics | 14 | 14 | 0 |
Conformance | 33.81% | 33.88% | +0.07% |
Fixed tests:
test/language/line-terminators/7.3-5.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-5.js (previously Failed)
test/language/line-terminators/7.3-15.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-15.js (previously Failed)
test/language/line-terminators/7.3-6.js [strict mode] (previously Failed)
test/language/line-terminators/7.3-6.js (previously Failed)
test/harness/decimalToHexString.js [strict mode] (previously Failed)
test/harness/decimalToHexString.js (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js [strict mode] (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js [strict mode] (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js (previously Failed)
test/built-ins/Date/prototype/toISOString/15.9.5.43-0-5.js [strict mode] (previously Failed)
test/built-ins/Date/prototype/toISOString/15.9.5.43-0-5.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js (previously Failed)
test/built-ins/Array/prototype/every/15.4.4.16-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/every/15.4.4.16-2-18.js (previously Failed)
test/built-ins/Array/prototype/some/15.4.4.17-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/some/15.4.4.17-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js (previously Failed)
This Pull Request makes
GetOwnProperty
forString
objects behave according to specification ( https://tc39.es/ecma262/#sec-string-exotic-objects-getownproperty-p )previously resulted in printing
undefined
, now it results in printing"a"