Bug 574132 - Implement rest parameters for JavaScript. r=jorendorff.

This commit is contained in:
Benjamin Peterson
2012-05-23 10:31:35 -05:00
parent 23aa77c418
commit d15a61f318
28 changed files with 307 additions and 26 deletions

View File

@@ -84,7 +84,7 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
Probes::compileScriptBegin(filename, lineno);
}
~ProbesManager() { Probes::compileScriptEnd(filename, lineno); }
};
};
ProbesManager probesManager(filename, lineno);
/*
@@ -231,6 +231,9 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
}
#endif
if (!parser.checkForArgumentsAndRest())
return NULL;
/*
* Nowadays the threaded interpreter needs a stop instruction, so we
* do have to emit that here.