Implement chain of ClassPrivateMemberData

* Each chain piece represents one of class
* User can uses private member with same name parent with child class
* We should check nearest [[homeObject]] of function to find where function is located

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2021-06-25 15:56:36 +09:00 committed by Boram Bae
commit 8c3cd2f3b1
19 changed files with 320 additions and 294 deletions

View file

@ -816,11 +816,11 @@ InterpretedCodeBlock* CodeCacheReader::loadInterpretedCodeBlock(Context* context
if (size_t privateNameSize = m_buffer.get<size_t>()) {
AtomicStringTightVector* nameVector = new AtomicStringTightVector();
nameVector->resize(privateNameSize);
nameVector->resizeWithUninitializedValues(privateNameSize);
for (size_t i = 0; i < privateNameSize; i++) {
size_t stringIndex = m_buffer.get<size_t>();
auto name = m_stringTable->get(stringIndex);
nameVector->data()[i] = name;
(*nameVector)[i] = name;
}
codeBlock->rareData()->m_classPrivateNames = nameVector;
}