Bug 1072911 - Scalar Replacement: Add missing MIRTypes. r=h4writer

This commit is contained in:
Nicolas B. Pierron 2014-09-26 19:47:59 +02:00
parent d50e32f0f9
commit 881e8c88d2
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,14 @@
function X () {};
function Y () {};
function testCallProtoMethod() {
var a = [new X, new X, __proto__, new Y, new Y];
}
testCallProtoMethod();
function testNot() {
var r;
for (var i = 0; i < 10; ++i)
r = [];
}
testNot();

View File

@ -3178,6 +3178,7 @@ MCreateThisWithTemplate::canRecoverOnBailout() const
MObjectState::MObjectState(MDefinition *obj)
{
// This instruction is only used as a summary for bailout paths.
setResultType(MIRType_Object);
setRecoveredOnBailout();
JSObject *templateObject = nullptr;
if (obj->isNewObject())

View File

@ -2581,6 +2581,7 @@ class MArrayState : public MVariadicInstruction
explicit MArrayState(MDefinition *arr)
{
// This instruction is only used as a summary for bailout paths.
setResultType(MIRType_Object);
setRecoveredOnBailout();
numElements_ = arr->toNewArray()->count();
}