Ignore:
Timestamp:
Jan 31, 2011, 12:07:21 PM (14 years ago)
Author:
[email protected]
Message:

2011-01-31 Oliver Hunt <[email protected]>

Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219

rolling r77098, r77099, r77100, r77109, and
r77111 back in, along with a few more Qt fix attempts.

Location:
trunk/Source/JavaScriptCore/interpreter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/CallFrame.h

    r77113 r77151  
    7676
    7777        void clearException() { globalData().exception = JSValue(); }
    78         JSValue exception() const { return globalData().exception; }
     78        JSValue exception() const { return globalData().exception.get(); }
    7979        bool hadException() const { return globalData().exception; }
    8080
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r77113 r77151  
    104104    Identifier& ident = codeBlock->identifier(property);
    105105    do {
    106         JSObject* o = *iter;
     106        JSObject* o = iter->get();
    107107        PropertySlot slot(o);
    108108        if (o->getPropertySlot(callFrame, ident, slot)) {
    109109            JSValue result = slot.getValue(callFrame, ident);
    110             exceptionValue = callFrame->globalData().exception;
     110            exceptionValue = callFrame->globalData().exception.get();
    111111            if (exceptionValue)
    112112                return false;
     
    143143    Identifier& ident = codeBlock->identifier(property);
    144144    do {
    145         JSObject* o = *iter;
     145        JSObject* o = iter->get();
    146146        PropertySlot slot(o);
    147147        if (o->getPropertySlot(callFrame, ident, slot)) {
    148148            JSValue result = slot.getValue(callFrame, ident);
    149             exceptionValue = callFrame->globalData().exception;
     149            exceptionValue = callFrame->globalData().exception.get();
    150150            if (exceptionValue)
    151151                return false;
     
    188188        }
    189189
    190         exceptionValue = callFrame->globalData().exception;
     190        exceptionValue = callFrame->globalData().exception.get();
    191191        if (exceptionValue)
    192192            return false;
     
    221221    }
    222222    while (skip--) {
    223         JSObject* o = *iter;
     223        JSObject* o = iter->get();
    224224        if (o->hasCustomProperties()) {
    225225            Identifier& ident = codeBlock->identifier(property);
     
    228228                if (o->getPropertySlot(callFrame, ident, slot)) {
    229229                    JSValue result = slot.getValue(callFrame, ident);
    230                     exceptionValue = callFrame->globalData().exception;
     230                    exceptionValue = callFrame->globalData().exception.get();
    231231                    if (exceptionValue)
    232232                        return false;
     
    237237                if (iter == end)
    238238                    break;
    239                 o = *iter;
     239                o = iter->get();
    240240                ++iter;
    241241            } while (true);
     
    267267        }
    268268       
    269         exceptionValue = callFrame->globalData().exception;
     269        exceptionValue = callFrame->globalData().exception.get();
    270270        if (exceptionValue)
    271271            return false;
     
    311311    JSObject* base;
    312312    do {
    313         base = *iter;
     313        base = iter->get();
    314314        PropertySlot slot(base);
    315315        if (base->getPropertySlot(callFrame, ident, slot)) {
    316316            JSValue result = slot.getValue(callFrame, ident);
    317             exceptionValue = callFrame->globalData().exception;
     317            exceptionValue = callFrame->globalData().exception.get();
    318318            if (exceptionValue)
    319319                return false;
     
    567567        while (!scopeChain->object->inherits(&JSActivation::info))
    568568            scopeChain = scopeChain->pop();
    569         JSActivation* activation = asActivation(scopeChain->object);
     569        JSActivation* activation = asActivation(scopeChain->object.get());
    570570        activation->copyRegisters();
    571571        if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue()) {
    572572            if (!oldCodeBlock->isStrictMode())
    573                 asArguments(arguments)->setActivation(activation);
     573                asArguments(arguments)->setActivation(callFrame->globalData(), activation);
    574574        }
    575575    } else if (oldCodeBlock->usesArguments() && !oldCodeBlock->isStrictMode()) {
     
    649649    }
    650650
    651     exception->putDirect(globalData->propertyNames->message, jsString(globalData, message));
     651    exception->putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message));
    652652}
    653653
     
    10861086        ASSERT(node);
    10871087        if (node->object->isVariableObject()) {
    1088             variableObject = static_cast<JSVariableObject*>(node->object);
     1088            variableObject = static_cast<JSVariableObject*>(node->object.get());
    10891089            break;
    10901090        }
     
    11011101        }
    11021102        // Scope for BatchedTransitionOptimizer
    1103         BatchedTransitionOptimizer optimizer(variableObject);
     1103        BatchedTransitionOptimizer optimizer(callFrame->globalData(), variableObject);
    11041104
    11051105        for (unsigned i = 0; i < numVariables; ++i) {
     
    13721372        // should not be treated as a dictionary.
    13731373        if (baseObject->structure()->isDictionary()) {
    1374             baseObject->flattenDictionaryObject();
     1374            baseObject->flattenDictionaryObject(callFrame->globalData());
    13751375            offset = baseObject->structure()->get(propertyName);
    13761376        }
     
    14761476#define CHECK_FOR_EXCEPTION() \
    14771477    do { \
    1478         if (UNLIKELY(globalData->exception != JSValue())) { \
    1479             exceptionValue = globalData->exception; \
     1478        if (UNLIKELY(globalData->exception.get() != JSValue())) { \
     1479            exceptionValue = globalData->exception.get(); \
    14801480            goto vm_throw; \
    14811481        } \
     
    24092409        }
    24102410        ASSERT((*iter)->isVariableObject());
    2411         JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
     2411        JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get());
    24122412        callFrame->uncheckedR(dst) = scope->registerAt(index);
    24132413        ASSERT(callFrame->r(dst).jsValue());
     
    24402440
    24412441        ASSERT((*iter)->isVariableObject());
    2442         JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
     2442        JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get());
    24432443        ASSERT(callFrame->r(value).jsValue());
    24442444        scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
     
    30813081                unsigned offset = vPC[7].u.operand;
    30823082                ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(codeBlock->identifier(vPC[2].u.operand))) == offset);
    3083                 baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
     3083                baseObject->putDirectOffset(callFrame->globalData(), offset, callFrame->r(value).jsValue());
    30843084
    30853085                vPC += OPCODE_LENGTH(op_put_by_id_transition);
     
    31163116               
    31173117                ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(codeBlock->identifier(vPC[2].u.operand))) == offset);
    3118                 baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
     3118                baseObject->putDirectOffset(callFrame->globalData(), offset, callFrame->r(value).jsValue());
    31193119
    31203120                vPC += OPCODE_LENGTH(op_put_by_id_replace);
     
    33103310                JSArray* jsArray = asArray(baseValue);
    33113311                if (jsArray->canSetIndex(i))
    3312                     jsArray->setIndex(i, callFrame->r(value).jsValue());
     3312                    jsArray->setIndex(*globalData, i, callFrame->r(value).jsValue());
    33133313                else
    33143314                    jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue());
     
    38363836        if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
    38373837            JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset);
    3838             if ((exceptionValue = globalData->exception))
     3838            if ((exceptionValue = globalData->exception.get()))
    38393839                goto vm_throw;
    38403840            functionReturnValue = result;
     
    41044104            if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
    41054105                if (!codeBlock->isStrictMode())
    4106                     asArguments(argumentsValue)->setActivation(asActivation(activationValue));
     4106                    asArguments(argumentsValue)->setActivation(*globalData, asActivation(activationValue));
    41074107            }
    41084108        } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
Note: See TracChangeset for help on using the changeset viewer.