Skip to content

Conversation

@matedabis
Copy link
Contributor

@matedabis matedabis commented Jan 24, 2019

The coverage is measured by the following script, using --jerry-test-suite --test262 --unittests --jerry-tests:
https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py
Comment added for each cases containing which part of the ES5.1 it tests.
Ran the test code in Gecko, V8, SpiderMonkey engines and got the same result.

Branch coverage:

  • Before: 28/38
  • After: 37/38

I spent a lot of time finding a way to trigger the last branch, but I could not. (ecma-builtin-array-prototype.c, line: 648) The following line needs to fail:
ECMA_TRY_CATCH (put_value, ecma_op_object_put (obj_p, upper_str_p, lower_value, true), ret_value);

Also found an opportunity to optimize, the second condition was not needed in that else if branch, as if the code reaches there, it cant be false.

JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu

Branch coverage:
Before: 28/38
After: 37//38

Also found an opportunity to optimize, the second condition was not needed
in that else if branch, as if the code reaches there, it cant be false.

JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant