Changeset 80738 in webkit
- Timestamp:
- Mar 10, 2011 11:27:49 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80737 r80738 1 2011-03-10 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 jquery/manipulation.html fails after r80598 6 https://bugs.webkit.org/show_bug.cgi?id=56019 7 8 Removed jQuery tests from skiplists 9 10 * platform/gtk/Skipped: 11 * platform/qt/Skipped: 12 1 13 2011-03-10 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/LayoutTests/platform/gtk/Skipped
r80736 r80738 103 103 # https://bugs.webkit.org/show_bug.cgi?id=55126 104 104 media/video-aspect-ratio.html 105 106 # https://bugs.webkit.org/show_bug.cgi?id=56080107 jquery/effects.html108 109 # https://bugs.webkit.org/show_bug.cgi?id=22770110 tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody.html111 105 112 106 ############################################################################### … … 1322 1316 http/tests/security/xss-DENIED-xsl-document-redirect.xml 1323 1317 http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml 1324 1325 # This test has failed since the import of the jquery test suite.1326 # https://bugs.webkit.org/show_bug.cgi?id=560191327 jquery/manipulation.html1328 1329 # https://bugs.webkit.org/show_bug.cgi?id=560811330 fast/js/large-expressions.html -
trunk/LayoutTests/platform/qt/Skipped
r80703 r80738 3200 3200 http/tests/appcache/auth.html 3201 3201 http/tests/xmlhttprequest/basic-auth.html 3202 3203 # jquery/manipulation.html fails after r805983204 # https://bugs.webkit.org/show_bug.cgi?id=560193205 jquery -
trunk/Source/JavaScriptCore/ChangeLog
r80691 r80738 1 2011-03-09 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 jquery/manipulation.html fails after r80598 6 https://bugs.webkit.org/show_bug.cgi?id=56019 7 8 When linking a call, codeblock now takes ownership of the linked function 9 This removes the need for unlinking, and thus the incorrectness that was 10 showing up in these tests. 11 12 * bytecode/CodeBlock.cpp: 13 (JSC::CodeBlock::~CodeBlock): 14 (JSC::CodeBlock::markAggregate): 15 * bytecode/CodeBlock.h: 16 (JSC::CallLinkInfo::CallLinkInfo): 17 (JSC::CallLinkInfo::setUnlinked): 18 (JSC::CodeBlock::addCaller): 19 * jit/JIT.cpp: 20 (JSC::JIT::privateCompile): 21 (JSC::JIT::linkCall): 22 (JSC::JIT::linkConstruct): 23 * jit/JIT.h: 24 * runtime/Executable.cpp: 25 * runtime/Executable.h: 26 1 27 2011-03-09 Daniel Bates <dbates@rim.com> 2 28 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r80598 r80738 1407 1407 m_structureStubInfos[i].deref(); 1408 1408 1409 for (size_t size = m_callLinkInfos.size(), i = 0; i < size; ++i) {1410 CallLinkInfo* callLinkInfo = &m_callLinkInfos[i];1411 if (callLinkInfo->isLinked())1412 callLinkInfo->callee->removeCaller(callLinkInfo);1413 }1414 1415 1409 for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) { 1416 1410 if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { … … 1422 1416 } 1423 1417 1424 #if ENABLE(JIT_OPTIMIZE_CALL)1425 unlinkCallers();1426 #endif1427 1428 1418 #endif // ENABLE(JIT) 1429 1419 … … 1432 1422 #endif 1433 1423 } 1434 1435 #if ENABLE(JIT_OPTIMIZE_CALL)1436 void CodeBlock::unlinkCallers()1437 {1438 size_t size = m_linkedCallerList.size();1439 for (size_t i = 0; i < size; ++i) {1440 CallLinkInfo* currentCaller = m_linkedCallerList[i];1441 JIT::unlinkCallOrConstruct(currentCaller);1442 currentCaller->setUnlinked();1443 }1444 m_linkedCallerList.clear();1445 }1446 #endif1447 1424 1448 1425 void CodeBlock::derefStructures(Instruction* vPC) const … … 1546 1523 for (size_t i = 0; i < m_functionDecls.size(); ++i) 1547 1524 markStack.append(&m_functionDecls[i]); 1525 #if ENABLE(JIT_OPTIMIZE_CALL) 1526 for (unsigned i = 0; i < numberOfCallLinkInfos(); ++i) 1527 if (callLinkInfo(i).isLinked()) 1528 markStack.append(&callLinkInfo(i).callee); 1529 #endif 1548 1530 } 1549 1531 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r80684 r80738 97 97 struct CallLinkInfo { 98 98 CallLinkInfo() 99 : callee(0) 100 , position(0) 99 : position(0) 101 100 , hasSeenShouldRepatch(0) 102 101 { … … 106 105 CodeLocationDataLabelPtr hotPathBegin; 107 106 CodeLocationNearCall hotPathOther; 108 CodeBlock* ownerCodeBlock; 109 CodeBlock* callee; 107 WriteBarrier<JSFunction> callee; 110 108 unsigned position : 31; 111 109 unsigned hasSeenShouldRepatch : 1; 112 110 113 void setUnlinked() { callee = 0; }111 void setUnlinked() { callee.clear(); } 114 112 bool isLinked() { return callee; } 115 113 … … 258 256 void refStructures(Instruction* vPC) const; 259 257 void derefStructures(Instruction* vPC) const; 260 #if ENABLE(JIT_OPTIMIZE_CALL)261 void unlinkCallers();262 #endif263 258 264 259 static void dumpStatistics(); … … 293 288 294 289 #if ENABLE(JIT) 295 void addCaller( CallLinkInfo* caller)296 { 297 caller->callee = this;290 void addCaller(JSGlobalData& globalData, CallLinkInfo* caller, JSFunction* callee) 291 { 292 caller->callee.set(globalData, ownerExecutable(), callee); 298 293 caller->position = m_linkedCallerList.size(); 299 294 m_linkedCallerList.append(caller); 300 }301 302 void removeCaller(CallLinkInfo* caller)303 {304 unsigned pos = caller->position;305 unsigned lastPos = m_linkedCallerList.size() - 1;306 307 if (pos != lastPos) {308 m_linkedCallerList[pos] = m_linkedCallerList[lastPos];309 m_linkedCallerList[pos]->position = pos;310 }311 m_linkedCallerList.shrink(lastPos);312 295 } 313 296 -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r78174 r80738 568 568 for (unsigned i = 0; i < m_codeBlock->numberOfCallLinkInfos(); ++i) { 569 569 CallLinkInfo& info = m_codeBlock->callLinkInfo(i); 570 info.ownerCodeBlock = m_codeBlock;571 570 info.callReturnLocation = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].callReturnLocation); 572 571 info.hotPathBegin = patchBuffer.locationOf(m_callStructureStubCompilationInfo[i].hotPathBegin); … … 589 588 590 589 #if ENABLE(JIT_OPTIMIZE_CALL) 591 void JIT::unlinkCallOrConstruct(CallLinkInfo* callLinkInfo)592 {593 // When the JSFunction is deleted the pointer embedded in the instruction stream will no longer be valid594 // (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive595 // match). Reset the check so it no longer matches.596 RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock);597 #if USE(JSVALUE32_64)598 repatchBuffer.repatch(callLinkInfo->hotPathBegin, 0);599 #else600 repatchBuffer.repatch(callLinkInfo->hotPathBegin, JSValue::encode(JSValue()));601 #endif602 }603 590 604 591 void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JIT::CodePtr code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) … … 612 599 613 600 if (calleeCodeBlock) 614 calleeCodeBlock->addCaller( callLinkInfo);601 calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee); 615 602 616 603 repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee); … … 632 619 633 620 if (calleeCodeBlock) 634 calleeCodeBlock->addCaller( callLinkInfo);621 calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee); 635 622 636 623 repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee); -
trunk/Source/JavaScriptCore/jit/JIT.h
r79551 r80738 246 246 static void linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, CodePtr, CallLinkInfo*, int callerArgCount, JSGlobalData*); 247 247 static void linkConstruct(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, CodePtr, CallLinkInfo*, int callerArgCount, JSGlobalData*); 248 static void unlinkCallOrConstruct(CallLinkInfo*);249 248 250 249 private: -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r80598 r80738 86 86 } 87 87 88 FunctionExecutable::~FunctionExecutable()89 {90 #if ENABLE(JIT_OPTIMIZE_CALL)91 if (isGeneratedForCall())92 generatedBytecodeForCall().unlinkCallers();93 if (isGeneratedForConstruct())94 generatedBytecodeForConstruct().unlinkCallers();95 #endif96 }97 88 98 89 JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode) -
trunk/Source/JavaScriptCore/runtime/Executable.h
r80598 r80738 308 308 } 309 309 310 ~FunctionExecutable();311 312 310 JSFunction* make(ExecState* exec, ScopeChainNode* scopeChain) 313 311 {
Note: See TracChangeset
for help on using the changeset viewer.