jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.
https://jerryscript.net
Apache License 2.0
6.96k stars 673 forks source link

RegExp.rightContext differs between Jerryscript and V8 #5123

Closed Qbtly closed 4 days ago

Qbtly commented 11 months ago
JerryScript revision

ff9ff8f36c967890b5ebb240d9fa90d6e351aa01

Build platform

Ubuntu 22.04.3

Build steps
python ./tools/build.py --builddir=xxx --clean --debug --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
Test case
var str = "ab";
var pattern = /a/;
str.split(pattern);
print(RegExp.rightContext);
Execution steps
./xxx/bin/jerry poc.js
Output
Jerryscript: undefined
V8: b
ossy-szeged commented 4 days ago

RegExp.rightContext is an ECMAScript stage3 feature, it is not implemented yet https://github.com/tc39/proposal-regexp-legacy-features