mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
allocate almost gc objects as typed gc object
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
e8689eed07
commit
dbbbdf2374
40 changed files with 506 additions and 105 deletions
|
|
@ -20,6 +20,19 @@ ObjectRareData::ObjectRareData()
|
|||
#endif
|
||||
}
|
||||
|
||||
void* ObjectRareData::operator new(size_t size)
|
||||
{
|
||||
static bool typeInited = false;
|
||||
static GC_descr descr;
|
||||
if (!typeInited) {
|
||||
GC_word obj_bitmap[GC_BITMAP_SIZE(ObjectRareData)] = { 0 };
|
||||
GC_set_bit(obj_bitmap, GC_WORD_OFFSET(ObjectRareData, m_extraData));
|
||||
GC_set_bit(obj_bitmap, GC_WORD_OFFSET(ObjectRareData, m_internalSlot));
|
||||
descr = GC_make_descriptor(obj_bitmap, GC_WORD_LEN(ObjectRareData));
|
||||
typeInited = true;
|
||||
}
|
||||
return GC_MALLOC_EXPLICITLY_TYPED(size, descr);
|
||||
}
|
||||
Value ObjectGetResult::valueSlowCase(ExecutionState& state, const Value& receiver) const
|
||||
{
|
||||
if (m_jsGetterSetter->hasGetter() && m_jsGetterSetter->getter().isFunction()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue