Skip to content

Commit

Permalink
[MERGE #3503 @sigatrev] Fix Issue #3497: move initialization to const…
Browse files Browse the repository at this point in the history
…ructor

Merge pull request #3503 from sigatrev:ConstructorInitialization
  • Loading branch information
sigatrev committed Aug 9, 2017
2 parents 177a7be + 361f31b commit e0141fb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Backend/ValueInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class JsTypeValueInfo : public ValueInfo

JsTypeValueInfo(const JsTypeValueInfo& other)
: ValueInfo(Uninitialized, ValueStructureKind::JsType),
jsType(other.jsType), jsTypeSet(other.jsTypeSet)
jsType(other.jsType), jsTypeSet(other.jsTypeSet), isShared(false)
{
}

Expand Down Expand Up @@ -576,9 +576,7 @@ class JsTypeValueInfo : public ValueInfo
public:
JsTypeValueInfo * Copy(JitArenaAllocator *const allocator) const
{
JsTypeValueInfo * newInfo = JitAnew(allocator, JsTypeValueInfo, *this);
newInfo->isShared = false;
return newInfo;
return JitAnew(allocator, JsTypeValueInfo, *this);
}

JITTypeHolder GetJsType() const
Expand Down

0 comments on commit e0141fb

Please sign in to comment.