Merged in changes from FESI 1.1.5
This commit is contained in:
parent
19fd7b0f7d
commit
719959353e
5 changed files with 95 additions and 55 deletions
|
@ -185,11 +185,15 @@ public final class ESArguments extends ESObject {
|
|||
ESValue[] argumentValues) {
|
||||
ObjectPrototype op =
|
||||
(ObjectPrototype) evaluator.getObjectPrototype();
|
||||
// Get maximum number of arguments (formal or actual), as
|
||||
// more than the number of formal arguments can be reached
|
||||
// using the (old fashioned) arguments variable).
|
||||
int maxArgs = Math.max(argumentValues.length, argumentNames.length);
|
||||
ESArguments args = new ESArguments(op, evaluator, argumentNames,
|
||||
Math.max(argumentValues.length, argumentNames.length),
|
||||
maxArgs,
|
||||
callee);
|
||||
try {
|
||||
for (int i=0; i<argumentValues.length; i++) {
|
||||
for (int i=0; i<maxArgs; i++) {
|
||||
ESValue val = (i<argumentValues.length) ? argumentValues[i] :
|
||||
ESUndefined.theUndefined;
|
||||
if (i<argumentNames.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue