Changeset 27231 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Oct 29, 2007, 12:17:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r27216 r27231 939 939 ASSERT(variableObject == exec->scopeChain().top()); 940 940 941 JSValue** v= &variableObject->localStorage()[index].value;942 double n = (* v)->toNumber(exec);941 JSValue** slot = &variableObject->localStorage()[index].value; 942 double n = (*slot)->toNumber(exec); 943 943 double newValue = (m_oper == OpPlusPlus) ? n + 1 : n - 1; 944 * v= jsNumber(newValue);944 *slot = jsNumber(newValue); 945 945 return jsNumber(n); 946 946 } … … 1181 1181 size_t index = functionBody->symbolTable().get(m_ident.ustring().rep()); 1182 1182 if (index != missingSymbolMarker()) 1183 new (this) Local TypeOfAccessNode(index);1184 } 1185 1186 JSValue* Local TypeOfAccessNode::evaluate(ExecState* exec)1183 new (this) LocalVarTypeOfNode(index); 1184 } 1185 1186 JSValue* LocalVarTypeOfNode::evaluate(ExecState* exec) 1187 1187 { 1188 1188 ActivationImp* variableObject = static_cast<ActivationImp*>(exec->variableObject()); … … 1234 1234 size_t index = functionBody->symbolTable().get(m_ident.ustring().rep()); 1235 1235 if (index != missingSymbolMarker()) 1236 new (this) PrefixLocalAccessNode(index);1237 } 1238 1239 JSValue* PrefixLocalAccessNode::evaluate(ExecState* exec)1236 new (this) LocalVarPrefixNode(index); 1237 } 1238 1239 JSValue* LocalVarPrefixNode::evaluate(ExecState* exec) 1240 1240 { 1241 1241 ActivationImp* variableObject = static_cast<ActivationImp*>(exec->variableObject()); … … 2006 2006 size_t index = functionBody->symbolTable().get(m_ident.ustring().rep()); 2007 2007 if (index != missingSymbolMarker()) 2008 new (this) AssignLocalAccessNode(index);2009 } 2010 2011 JSValue* AssignLocalAccessNode::evaluate(ExecState* exec)2008 new (this) LocalVarAssignNode(index); 2009 } 2010 2011 JSValue* LocalVarAssignNode::evaluate(ExecState* exec) 2012 2012 { 2013 2013 ActivationImp* variableObject = static_cast<ActivationImp*>(exec->variableObject()); … … 2015 2015 ASSERT(variableObject == exec->scopeChain().top()); 2016 2016 JSValue* v; 2017 JSValue** slot = &variableObject->localStorage()[m_index].value; 2017 2018 2018 2019 if (m_oper == OpEqual) 2019 2020 v = m_right->evaluate(exec); 2020 2021 else { 2021 JSValue* v1 = variableObject->localStorage()[m_index].value;2022 KJS_CHECKEXCEPTIONVALUE2023 2022 JSValue* v2 = m_right->evaluate(exec); 2024 v = valueForReadModifyAssignment(exec, v1, v2, m_oper);2023 v = valueForReadModifyAssignment(exec, *slot, v2, m_oper); 2025 2024 } 2026 2025 2027 2026 KJS_CHECKEXCEPTIONVALUE 2028 2027 2029 variableObject->localStorage()[m_index].value= v;2028 *slot = v; 2030 2029 return v; 2031 2030 }
Note:
See TracChangeset
for help on using the changeset viewer.