The algorithm is based on ECMA-262 v11, 22.1.3.28 JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]