Esempio n. 1
0
void List::derefValues()
{
    ListImp *imp = static_cast<ListImp *>(_impBase);
    
    int size = imp->size;
    
    int inlineSize = MIN(size, inlineValuesSize);
#if !USE_CONSERVATIVE_GC
    for (int i = 0; i != inlineSize; ++i)
        imp->values[i]->deref();
#endif

#if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
    for (int i = 0; i != inlineSize; ++i)
        gcUnprotect(imp->values[i]);
#endif
    
    int overflowSize = size - inlineSize;
    ValueImp **overflow = imp->overflow;
#if !USE_CONSERVATIVE_GC
    for (int i = 0; i != overflowSize; ++i)
        overflow[i]->deref();
#endif

#if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
    for (int i = 0; i != overflowSize; ++i)
        gcUnprotect(overflow[i]);
#endif
}
Esempio n. 2
0
void VM::dumpRegExpTrace()
{
    // The first RegExp object is ignored.  It is create by the RegExpPrototype ctor and not used.
    RTTraceList::iterator iter = ++m_rtTraceList->begin();
    
    if (iter != m_rtTraceList->end()) {
        dataLogF("\nRegExp Tracing\n");
        dataLogF("Regular Expression                              8 Bit          16 Bit        match()    Matches    Average\n");
        dataLogF(" <Match only / Match>                         JIT Addr      JIT Address       calls      found   String len\n");
        dataLogF("----------------------------------------+----------------+----------------+----------+----------+-----------\n");
    
        unsigned reCount = 0;
    
        for (; iter != m_rtTraceList->end(); ++iter, ++reCount) {
            (*iter)->printTraceData();
            gcUnprotect(*iter);
        }

        dataLogF("%d Regular Expressions\n", reCount);
    }
    
    m_rtTraceList->clear();
}
Esempio n. 3
0
static void unprotectGlobalObject(void* data) 
{
    JSGlueAPIEntry entry;
    gcUnprotect(static_cast<JSGlueGlobalObject*>(data));
}
Esempio n. 4
0
static void unprotectGlobalObject(void* data) 
{
    JSLock lock(true);
    gcUnprotect(static_cast<JSGlueGlobalObject*>(data));
}