Implement per thread isolating

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2021-07-14 20:53:52 +09:00 committed by Boram Bae
commit 77a68579a5
59 changed files with 228 additions and 205 deletions

View file

@ -38,8 +38,8 @@ StringObject::StringObject(ExecutionState& state, Object* proto, String* value)
void* StringObject::operator new(size_t size)
{
static bool typeInited = false;
static GC_descr descr;
static MAY_THREAD_LOCAL bool typeInited = false;
static MAY_THREAD_LOCAL GC_descr descr;
if (!typeInited) {
GC_word obj_bitmap[GC_BITMAP_SIZE(StringObject)] = { 0 };
Object::fillGCDescriptor(obj_bitmap);
@ -135,8 +135,8 @@ StringIteratorObject::StringIteratorObject(ExecutionState& state, String* s)
void* StringIteratorObject::operator new(size_t size)
{
static bool typeInited = false;
static GC_descr descr;
static MAY_THREAD_LOCAL bool typeInited = false;
static MAY_THREAD_LOCAL GC_descr descr;
if (!typeInited) {
GC_word obj_bitmap[GC_BITMAP_SIZE(StringIteratorObject)] = { 0 };
Object::fillGCDescriptor(obj_bitmap);