Bug 925777 - Remove possibly thread unsafe constructors from Par variants of MIR. (r=bhackett)

This commit is contained in:
Shu-yu Guo 2013-10-15 01:30:36 -07:00
Родитель 220aa386fa
Коммит 3843cb9fe1
1 изменённых файлов: 14 добавлений и 26 удалений

Просмотреть файл

@ -3972,12 +3972,8 @@ class MConcatPar
public:
INSTRUCTION_HEADER(ConcatPar)
static MConcatPar *New(MDefinition *slice, MDefinition *left, MDefinition *right) {
return new MConcatPar(slice, left, right);
}
static MConcatPar *New(MDefinition *slice, MConcat *concat) {
return New(slice, concat->lhs(), concat->rhs());
return new MConcatPar(slice, concat->lhs(), concat->rhs());
}
MDefinition *forkJoinSlice() const {
@ -4553,6 +4549,13 @@ struct LambdaFunctionInfo
singletonType(fun->hasSingletonType()),
useNewTypeForClone(types::UseNewTypeForClone(fun))
{}
LambdaFunctionInfo(const LambdaFunctionInfo &info)
: fun((JSFunction *) info.fun), flags(info.flags),
scriptOrLazyScript(info.scriptOrLazyScript),
singletonType(info.singletonType),
useNewTypeForClone(info.useNewTypeForClone)
{}
};
class MLambda
@ -4593,11 +4596,11 @@ class MLambdaPar
LambdaFunctionInfo info_;
MLambdaPar(MDefinition *slice, MDefinition *scopeChain, JSFunction *fun,
types::TemporaryTypeSet *resultTypes)
: MBinaryInstruction(slice, scopeChain), info_(fun)
types::TemporaryTypeSet *resultTypes, const LambdaFunctionInfo &info)
: MBinaryInstruction(slice, scopeChain), info_(info)
{
JS_ASSERT(!fun->hasSingletonType());
JS_ASSERT(!types::UseNewTypeForClone(fun));
JS_ASSERT(!info_.singletonType);
JS_ASSERT(!info_.useNewTypeForClone);
setResultType(MIRType_Object);
setResultTypeSet(resultTypes);
}
@ -4605,13 +4608,9 @@ class MLambdaPar
public:
INSTRUCTION_HEADER(LambdaPar);
static MLambdaPar *New(MDefinition *slice, MDefinition *scopeChain, JSFunction *fun) {
return new MLambdaPar(slice, scopeChain, fun, MakeSingletonTypeSet(fun));
}
static MLambdaPar *New(MDefinition *slice, MLambda *lambda) {
return new MLambdaPar(slice, lambda->scopeChain(), lambda->info().fun,
lambda->resultTypeSet());
lambda->resultTypeSet(), lambda->info());
}
MDefinition *forkJoinSlice() const {
@ -7916,11 +7915,6 @@ class MRestPar
public:
INSTRUCTION_HEADER(RestPar);
static MRestPar *New(MDefinition *slice, MDefinition *numActuals, unsigned numFormals,
JSObject *templateObject) {
return new MRestPar(slice, numActuals, numFormals, templateObject,
MakeSingletonTypeSet(templateObject));
}
static MRestPar *New(MDefinition *slice, MRest *rest) {
return new MRestPar(slice, rest->numActuals(), rest->numFormals(),
rest->templateObject(), rest->resultTypeSet());
@ -8216,14 +8210,8 @@ class MNewCallObjectPar : public MBinaryInstruction
public:
INSTRUCTION_HEADER(NewCallObjectPar);
static MNewCallObjectPar *New(MDefinition *slice, JSObject *templateObj,
MDefinition *slots)
{
return new MNewCallObjectPar(slice, templateObj, slots);
}
static MNewCallObjectPar *New(MDefinition *slice, MNewCallObject *callObj) {
return New(slice, callObj->templateObject(), callObj->slots());
return new MNewCallObjectPar(slice, callObj->templateObject(), callObj->slots());
}
MDefinition *forkJoinSlice() const {