Update the RegExp constructor to ECMA-262 v6 (#3538)

The following methods have been implemented:
- RegExpAlloc, based on ECMA-262 v6, 21.2.3.2.1
- RegExpInitialize, based on ECMA-262 v6, 22.2.3.2.2
- RegExpCreate, based on ECMA-262 v6, 21.2.3.2.3

Co-authored-by: Robert Fancsik frobert@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-03-27 10:37:06 +01:00
committed by GitHub
parent 56832d772e
commit d539d30bf9
18 changed files with 618 additions and 358 deletions
+6
View File
@@ -14,12 +14,18 @@
var r = RegExp ("a","gim");
var r2 = RegExp (r,"gim");
var r3 = RegExp (r);
assert(r2.source === 'a');
assert(r2.global === true);
assert(r2.ignoreCase === true);
assert(r2.multiline === true);
assert(r3.source === 'a');
assert(r3.global === true);
assert(r3.ignoreCase === true);
assert(r3.multiline === true);
var obj = { get source() { throw 5 }, [Symbol.match] : true }
try {