mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. reduce memory usage of CallNativeFunction, CallBoundFunction
2. optimize StringBuilder Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
3a6cdd7931
commit
750ba31982
12 changed files with 236 additions and 72 deletions
|
|
@ -78,7 +78,24 @@ String* RopeString::createRopeString(String* lstr, String* rstr, ExecutionState*
|
|||
rope->m_contentLength = llen + rlen;
|
||||
rope->m_left = lstr;
|
||||
rope->m_right = rstr;
|
||||
|
||||
rope->m_has8BitContent = lstr->has8BitContent() && rstr->has8BitContent();
|
||||
/*
|
||||
bool has8 = true;
|
||||
if (!lstr->has8BitContent()) {
|
||||
if (!isAllLatin1((char16_t*)lstr->bufferAccessData().buffer, llen)) {
|
||||
has8 = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (has8 && !rstr->has8BitContent()) {
|
||||
if (!isAllLatin1((char16_t*)rstr->bufferAccessData().buffer, rlen)) {
|
||||
has8 = false;
|
||||
}
|
||||
}
|
||||
|
||||
rope->m_has8BitContent = has8;
|
||||
*/
|
||||
return rope;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue