Changeset 77151 in webkit for trunk/Source/JavaScriptCore/interpreter
- Timestamp:
- Jan 31, 2011, 12:07:21 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore/interpreter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r77113 r77151 76 76 77 77 void clearException() { globalData().exception = JSValue(); } 78 JSValue exception() const { return globalData().exception ; }78 JSValue exception() const { return globalData().exception.get(); } 79 79 bool hadException() const { return globalData().exception; } 80 80 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r77113 r77151 104 104 Identifier& ident = codeBlock->identifier(property); 105 105 do { 106 JSObject* o = *iter;106 JSObject* o = iter->get(); 107 107 PropertySlot slot(o); 108 108 if (o->getPropertySlot(callFrame, ident, slot)) { 109 109 JSValue result = slot.getValue(callFrame, ident); 110 exceptionValue = callFrame->globalData().exception ;110 exceptionValue = callFrame->globalData().exception.get(); 111 111 if (exceptionValue) 112 112 return false; … … 143 143 Identifier& ident = codeBlock->identifier(property); 144 144 do { 145 JSObject* o = *iter;145 JSObject* o = iter->get(); 146 146 PropertySlot slot(o); 147 147 if (o->getPropertySlot(callFrame, ident, slot)) { 148 148 JSValue result = slot.getValue(callFrame, ident); 149 exceptionValue = callFrame->globalData().exception ;149 exceptionValue = callFrame->globalData().exception.get(); 150 150 if (exceptionValue) 151 151 return false; … … 188 188 } 189 189 190 exceptionValue = callFrame->globalData().exception ;190 exceptionValue = callFrame->globalData().exception.get(); 191 191 if (exceptionValue) 192 192 return false; … … 221 221 } 222 222 while (skip--) { 223 JSObject* o = *iter;223 JSObject* o = iter->get(); 224 224 if (o->hasCustomProperties()) { 225 225 Identifier& ident = codeBlock->identifier(property); … … 228 228 if (o->getPropertySlot(callFrame, ident, slot)) { 229 229 JSValue result = slot.getValue(callFrame, ident); 230 exceptionValue = callFrame->globalData().exception ;230 exceptionValue = callFrame->globalData().exception.get(); 231 231 if (exceptionValue) 232 232 return false; … … 237 237 if (iter == end) 238 238 break; 239 o = *iter;239 o = iter->get(); 240 240 ++iter; 241 241 } while (true); … … 267 267 } 268 268 269 exceptionValue = callFrame->globalData().exception ;269 exceptionValue = callFrame->globalData().exception.get(); 270 270 if (exceptionValue) 271 271 return false; … … 311 311 JSObject* base; 312 312 do { 313 base = *iter;313 base = iter->get(); 314 314 PropertySlot slot(base); 315 315 if (base->getPropertySlot(callFrame, ident, slot)) { 316 316 JSValue result = slot.getValue(callFrame, ident); 317 exceptionValue = callFrame->globalData().exception ;317 exceptionValue = callFrame->globalData().exception.get(); 318 318 if (exceptionValue) 319 319 return false; … … 567 567 while (!scopeChain->object->inherits(&JSActivation::info)) 568 568 scopeChain = scopeChain->pop(); 569 JSActivation* activation = asActivation(scopeChain->object );569 JSActivation* activation = asActivation(scopeChain->object.get()); 570 570 activation->copyRegisters(); 571 571 if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue()) { 572 572 if (!oldCodeBlock->isStrictMode()) 573 asArguments(arguments)->setActivation( activation);573 asArguments(arguments)->setActivation(callFrame->globalData(), activation); 574 574 } 575 575 } else if (oldCodeBlock->usesArguments() && !oldCodeBlock->isStrictMode()) { … … 649 649 } 650 650 651 exception->putDirect( globalData->propertyNames->message, jsString(globalData, message));651 exception->putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message)); 652 652 } 653 653 … … 1086 1086 ASSERT(node); 1087 1087 if (node->object->isVariableObject()) { 1088 variableObject = static_cast<JSVariableObject*>(node->object );1088 variableObject = static_cast<JSVariableObject*>(node->object.get()); 1089 1089 break; 1090 1090 } … … 1101 1101 } 1102 1102 // Scope for BatchedTransitionOptimizer 1103 BatchedTransitionOptimizer optimizer( variableObject);1103 BatchedTransitionOptimizer optimizer(callFrame->globalData(), variableObject); 1104 1104 1105 1105 for (unsigned i = 0; i < numVariables; ++i) { … … 1372 1372 // should not be treated as a dictionary. 1373 1373 if (baseObject->structure()->isDictionary()) { 1374 baseObject->flattenDictionaryObject( );1374 baseObject->flattenDictionaryObject(callFrame->globalData()); 1375 1375 offset = baseObject->structure()->get(propertyName); 1376 1376 } … … 1476 1476 #define CHECK_FOR_EXCEPTION() \ 1477 1477 do { \ 1478 if (UNLIKELY(globalData->exception != JSValue())) { \1479 exceptionValue = globalData->exception ; \1478 if (UNLIKELY(globalData->exception.get() != JSValue())) { \ 1479 exceptionValue = globalData->exception.get(); \ 1480 1480 goto vm_throw; \ 1481 1481 } \ … … 2409 2409 } 2410 2410 ASSERT((*iter)->isVariableObject()); 2411 JSVariableObject* scope = static_cast<JSVariableObject*>( *iter);2411 JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get()); 2412 2412 callFrame->uncheckedR(dst) = scope->registerAt(index); 2413 2413 ASSERT(callFrame->r(dst).jsValue()); … … 2440 2440 2441 2441 ASSERT((*iter)->isVariableObject()); 2442 JSVariableObject* scope = static_cast<JSVariableObject*>( *iter);2442 JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get()); 2443 2443 ASSERT(callFrame->r(value).jsValue()); 2444 2444 scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); … … 3081 3081 unsigned offset = vPC[7].u.operand; 3082 3082 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()); 3084 3084 3085 3085 vPC += OPCODE_LENGTH(op_put_by_id_transition); … … 3116 3116 3117 3117 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()); 3119 3119 3120 3120 vPC += OPCODE_LENGTH(op_put_by_id_replace); … … 3310 3310 JSArray* jsArray = asArray(baseValue); 3311 3311 if (jsArray->canSetIndex(i)) 3312 jsArray->setIndex( i, callFrame->r(value).jsValue());3312 jsArray->setIndex(*globalData, i, callFrame->r(value).jsValue()); 3313 3313 else 3314 3314 jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue()); … … 3836 3836 if (thisValue == globalObject && funcVal == globalObject->evalFunction()) { 3837 3837 JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset); 3838 if ((exceptionValue = globalData->exception ))3838 if ((exceptionValue = globalData->exception.get())) 3839 3839 goto vm_throw; 3840 3840 functionReturnValue = result; … … 4104 4104 if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { 4105 4105 if (!codeBlock->isStrictMode()) 4106 asArguments(argumentsValue)->setActivation( asActivation(activationValue));4106 asArguments(argumentsValue)->setActivation(*globalData, asActivation(activationValue)); 4107 4107 } 4108 4108 } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
Note:
See TracChangeset
for help on using the changeset viewer.