Changeset 27501 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Nov 6, 2007, 10:03:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r27494 r27501 935 935 } 936 936 937 void PostIncResolveNode::optimizeForUnnecessaryResult() 938 { 939 new (this) PreIncResolveNode(PlacementNewAdopt); 940 } 941 937 942 JSValue* PostIncLocalVarNode::evaluate(ExecState* exec) 938 943 { … … 940 945 ASSERT(static_cast<ActivationImp*>(exec->variableObject()) == exec->scopeChain().top()); 941 946 942 JSValue** slot = &exec->localStorage()[ index].value;947 JSValue** slot = &exec->localStorage()[m_index].value; 943 948 JSValue* v = (*slot)->toJSNumber(exec); 944 949 *slot = jsNumber(v->toNumber(exec) + 1); 945 950 return v; 951 } 952 953 void PostIncLocalVarNode::optimizeForUnnecessaryResult() 954 { 955 new (this) PreIncLocalVarNode(m_index); 946 956 } 947 957 … … 982 992 return throwUndefinedVariableError(exec, m_ident); 983 993 } 984 994 995 void PostDecResolveNode::optimizeForUnnecessaryResult() 996 { 997 new (this) PreDecResolveNode(PlacementNewAdopt); 998 } 999 985 1000 JSValue* PostDecLocalVarNode::evaluate(ExecState* exec) 986 1001 { … … 988 1003 ASSERT(static_cast<ActivationImp*>(exec->variableObject()) == exec->scopeChain().top()); 989 1004 990 JSValue** slot = &exec->localStorage()[ index].value;1005 JSValue** slot = &exec->localStorage()[m_index].value; 991 1006 JSValue* v = (*slot)->toJSNumber(exec); 992 1007 *slot = jsNumber(v->toNumber(exec) - 1); … … 994 1009 } 995 1010 1011 void PostDecLocalVarNode::optimizeForUnnecessaryResult() 1012 { 1013 new (this) PreDecLocalVarNode(m_index); 1014 } 1015 996 1016 // ------------------------------ PostfixBracketNode ---------------------------------- 997 1017
Note:
See TracChangeset
for help on using the changeset viewer.