Implement function.toString operation (#4752)

May increase the memory consumtpion heavily.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-08-31 13:37:25 +02:00
committed by GitHub
parent 1c6b18ecdf
commit 6649940ea6
37 changed files with 1002 additions and 192 deletions
+3 -1
View File
@@ -149,7 +149,9 @@ new delete_test ();
function binary_test_1 () {
/*/ new.target is converted to string */
assert ((new.target + 1) === "function(){/* ecmascript */}1");
var str = (new.target + 1);
assert (str.substring(0, 8) === "function"
&& str.substring(str.length - 2, str.length) === "}1");
}
function binary_test_2 () { assert (isNaN (new.target - 3)); }
function binary_test_3 () { assert (isNaN (new.target * 2)); }