Function to string does not comply with ECMAScript specification
Description
When a user-defined function (not a built-in function) is converted to a string, the jerryscript engine returns a placeholder for '/* ecmascript */' instead of the actual function body string. This is inconsistent with the ECMAScript specification and mainstream engine behavior, and may have an impact on the relevant code.
Version
v3.0.0
Testcase
var functionArray = [
function () {}
];
functionArray = functionArray + functionArray;
print(functionArray.length);
Output
64
Expected output
28
Good catch.
- Does the English doc need the same change?
- Should merge this change into master as well.
Hi @wynejan, is this PR still being processed?
Any update?
I'll convert this PR to draft first, if the changes are done please request review again.
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions.
This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.