Skip to content

Commit b5f8fad

Browse files
pleathMikeHolman
authored andcommitted
1 parent 9725847 commit b5f8fad

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Backend/IRBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ IRBuilder::BuildReg1(Js::OpCode newOpcode, uint32 offset, Js::RegSlot R0)
17581758
}
17591759

17601760
case Js::OpCode::NewScObjectSimple:
1761-
dstValueType = ValueType::GetObject(ObjectType::Object);
1761+
dstValueType = ValueType::GetObject(ObjectType::UninitializedObject);
17621762
// fall-through
17631763
case Js::OpCode::LdFuncExpr:
17641764
m_func->DisableCanDoInlineArgOpt();
@@ -5050,7 +5050,7 @@ IRBuilder::BuildAuxiliary(Js::OpCode newOpcode, uint32 offset)
50505050
// lower take it from there...
50515051
srcOpnd = IR::IntConstOpnd::New(auxInsn->Offset, TyUint32, m_func);
50525052
dstOpnd = this->BuildDstOpnd(dstRegSlot);
5053-
dstOpnd->SetValueType(ValueType::GetObject(ObjectType::Object));
5053+
dstOpnd->SetValueType(ValueType::GetObject(ObjectType::UninitializedObject));
50545054
instr = IR::Instr::New(newOpcode, dstOpnd, srcOpnd, m_func);
50555055

50565056
// Because we're going to be making decisions based off the value, we have to defer

lib/Runtime/Language/ValueType.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ bool ValueType::IsNotArrayOrObjectWithArray() const
577577
{
578578
return
579579
IsNotObject() ||
580-
(IsObject() && GetObjectType() != ObjectType::ObjectWithArray && GetObjectType() != ObjectType::Array);
580+
(IsObject() && GetObjectType() != ObjectType::ObjectWithArray && GetObjectType() != ObjectType::Array
581+
&& GetObjectType() != ObjectType::UninitializedObject && GetObjectType() != ObjectType::Object);
581582
}
582583

583584
bool ValueType::IsNativeArray() const

0 commit comments

Comments
 (0)