Changeset 34032 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- May 22, 2008, 12:55:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r34009 r34032 1799 1799 } 1800 1800 BEGIN_OPCODE(op_call_eval) { 1801 int r0= (++vPC)->u.operand;1802 int r1= (++vPC)->u.operand;1803 int r2= (++vPC)->u.operand;1801 int dst = (++vPC)->u.operand; 1802 int func = (++vPC)->u.operand; 1803 int base = (++vPC)->u.operand; 1804 1804 int argv = (++vPC)->u.operand; 1805 1805 int argc = (++vPC)->u.operand; 1806 1806 1807 JSValue* v = r[r1].u.jsValue;1808 JSValue* base = r[r2].u.jsValue;1809 1810 if (base == scopeChain->globalObject() && v== scopeChain->globalObject()->evalFunction()) {1807 JSValue* funcVal = r[func].u.jsValue; 1808 JSValue* baseVal = r[base].u.jsValue; 1809 1810 if (baseVal == scopeChain->globalObject() && funcVal == scopeChain->globalObject()->evalFunction()) { 1811 1811 int registerOffset = r - (*registerBase); 1812 1812 … … 1821 1821 goto vm_throw; 1822 1822 1823 r[ r0].u.jsValue = result;1823 r[dst].u.jsValue = result; 1824 1824 1825 1825 ++vPC; … … 1831 1831 // value. 1832 1832 vPC -= 5; 1833 r[ r2].u.jsValue = base->toObject(exec)->toThisObject(exec);1833 r[base].u.jsValue = baseVal->toObject(exec)->toThisObject(exec); 1834 1834 1835 1835 #if HAVE(COMPUTED_GOTO) … … 1842 1842 } 1843 1843 BEGIN_OPCODE(op_call) { 1844 int r0= (++vPC)->u.operand;1845 int r1= (++vPC)->u.operand;1846 int r2= (++vPC)->u.operand;1844 int dst = (++vPC)->u.operand; 1845 int func = (++vPC)->u.operand; 1846 int base = (++vPC)->u.operand; 1847 1847 int argv = (++vPC)->u.operand; 1848 1848 int argc = (++vPC)->u.operand; 1849 1849 1850 JSValue* v = r[ r1].u.jsValue;1850 JSValue* v = r[func].u.jsValue; 1851 1851 1852 1852 CallData callData; … … 1858 1858 int callFrameOffset = registerOffset + argv - CallFrameHeaderSize; 1859 1859 1860 r[argv].u.jsValue = r2 == missingThisObjectMarker() ? exec->globalThisValue() : r[r2].u.jsValue; // "this" value1861 initializeCallFrame(callFrame, codeBlock, vPC, scopeChain, registerOffset, r0, argv, argc, 0, v);1860 r[argv].u.jsValue = base == missingThisObjectMarker() ? exec->globalThisValue() : r[base].u.jsValue; // "this" value 1861 initializeCallFrame(callFrame, codeBlock, vPC, scopeChain, registerOffset, dst, argv, argc, 0, v); 1862 1862 1863 1863 ScopeChainNode* callDataScopeChain = callData.js.scopeChain; … … 1881 1881 int registerOffset = r - (*registerBase); 1882 1882 1883 r[argv].u.jsValue = r2 == missingThisObjectMarker() ? exec->globalThisValue() : (r[r2].u.jsValue)->toObject(exec); // "this" value1883 r[argv].u.jsValue = base == missingThisObjectMarker() ? exec->globalThisValue() : (r[base].u.jsValue)->toObject(exec); // "this" value 1884 1884 JSObject* thisObj = static_cast<JSObject*>(r[argv].u.jsValue); 1885 1885 … … 1891 1891 1892 1892 r = (*registerBase) + registerOffset; 1893 r[ r0].u.jsValue = returnValue;1893 r[dst].u.jsValue = returnValue; 1894 1894 1895 1895 VM_CHECK_EXCEPTION(); … … 1942 1942 } 1943 1943 BEGIN_OPCODE(op_construct) { 1944 int r0= (++vPC)->u.operand;1945 int r1= (++vPC)->u.operand;1944 int dst = (++vPC)->u.operand; 1945 int func = (++vPC)->u.operand; 1946 1946 int argv = (++vPC)->u.operand; 1947 1947 int argc = (++vPC)->u.operand; 1948 1948 1949 JSValue* v = r[r1].u.jsValue;1949 JSValue* funcVal = r[func].u.jsValue; 1950 1950 1951 1951 ConstructData constructData; 1952 ConstructType constructType = v->getConstructData(constructData);1952 ConstructType constructType = funcVal->getConstructData(constructData); 1953 1953 1954 1954 // Removing this line of code causes a measurable regression on squirrelfish. 1955 JSObject* constructor = static_cast<JSObject*>( v);1955 JSObject* constructor = static_cast<JSObject*>(funcVal); 1956 1956 1957 1957 if (constructType == ConstructTypeJS) { … … 1969 1969 r[argv].u.jsValue = newObject; // "this" value 1970 1970 1971 initializeCallFrame(callFrame, codeBlock, vPC, scopeChain, registerOffset, r0, argv, argc, 1, constructor);1972 1971 initializeCallFrame(callFrame, codeBlock, vPC, scopeChain, registerOffset, dst, argv, argc, 1, constructor); 1972 1973 1973 ScopeChainNode* callDataScopeChain = constructData.js.scopeChain; 1974 1974 FunctionBodyNode* functionBodyNode = constructData.js.functionBody; … … 1995 1995 JSValue* returnValue = constructor->construct(exec, args); 1996 1996 registerFile->setSafeForReentry(false); 1997 1997 1998 1998 r = (*registerBase) + registerOffset; 1999 1999 VM_CHECK_EXCEPTION(); 2000 r[ r0].u.jsValue = returnValue;2001 2000 r[dst].u.jsValue = returnValue; 2001 2002 2002 ++vPC; 2003 2003 NEXT_OPCODE; … … 2006 2006 ASSERT(constructType == ConstructTypeNone); 2007 2007 2008 exceptionValue = createNotAConstructorError(exec, v, 0);2008 exceptionValue = createNotAConstructorError(exec, funcVal, 0); 2009 2009 goto vm_throw; 2010 2010 }
Note:
See TracChangeset
for help on using the changeset viewer.