F
Florian Loitsch
I'm currently writing a JS->Scheme compiler (which, using Bigloo,
automatically yields a JS->C, JS->JVM, JS->.NET compiler), and have a
question concerning the function-parameters:
According to the spec (10.1.6) the activation-object already contains the
the parameters-object when the variables are instantiated (10.1.3). The
question is now: does a parameter "parameters" overwrite the
"parameters"-object or not?
All three implementations I tested (Konqueror, Mozilla and Rhino) do not
overwrite the object, but I've already seen all three fail on other simple
examples.
Here's a minimal example:
===
function g(parameters) {
alert(arguments.length);
}
g({length:"object"}); // => "object"? 1?
===
// florian loitsch
automatically yields a JS->C, JS->JVM, JS->.NET compiler), and have a
question concerning the function-parameters:
According to the spec (10.1.6) the activation-object already contains the
the parameters-object when the variables are instantiated (10.1.3). The
question is now: does a parameter "parameters" overwrite the
"parameters"-object or not?
All three implementations I tested (Konqueror, Mozilla and Rhino) do not
overwrite the object, but I've already seen all three fail on other simple
examples.
Here's a minimal example:
===
function g(parameters) {
alert(arguments.length);
}
g({length:"object"}); // => "object"? 1?
===
// florian loitsch