Description
According to Ecma262 specification, When changing the arguments exotic object's property, it will change the corresponding value of the argument binding at the same time. But when I executed the following test case, Hermes doesn't use the arguments object to change the argument correctly. I think it may be a bug of the Hermes engine.
Version
b6530ae(release)
Testcase
function f0(args){
var v0 = 0;
for (var v1 = 0; v1 < args.length; ++v1){
v0 += args[v1];
args[v1] += v1;
}
return v0;
}
function f1(a, b, c, d){
return [
f0(arguments),
a,
b,
c,
d
];
}
print(f1(0,1,2,3));
Command
./build/bin/hermes -w testcase.js
Output
Expected Output
Ecma262 Specification
9.4.4 Arguments Exotic Objects
NOTE 2 ……This means that changing the property changes the corresponding value of the argument binding and vice-versa. ……
Description
According to Ecma262 specification, When changing the
argumentsexotic object's property, it will change the corresponding value of the argument binding at the same time. But when I executed the following test case, Hermes doesn't use theargumentsobject to change the argument correctly. I think it may be a bug of the Hermes engine.Version
b6530ae(release)
Testcase
Command
Output
Expected Output
Ecma262 Specification
9.4.4 Arguments Exotic Objects
NOTE 2 ……This means that changing the property changes the corresponding value of the argument binding and vice-versa. ……