Changeset 70673 in webkit
- Timestamp:
- Oct 27, 2010 10:59:57 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r70642 r70673 1 2010-10-25 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=41948 6 REGRESSION(r60392): Registerfile can be unwound too far following an exception 7 8 SunSpider reports no change. 9 10 * interpreter/Interpreter.cpp: 11 (JSC::Interpreter::throwException): Walk the stack to calculate the high 12 water mark currently in use. It's not safe to assume that the current 13 CallFrame's high water mark is the highest high water mark because 14 calls do not always set up at the end of a CallFrame. A large caller 15 CallFrame can encompass a small callee CallFrame. 16 17 * jit/JITOpcodes.cpp: 18 (JSC::JIT::privateCompileCTINativeCall): 19 * jit/JITOpcodes32_64.cpp: 20 (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock 21 in the CallFrame of a host call, like the Interpreter does, instead of 22 leaving the CodeBlock field uninitialized. The backtracing code requires 23 a valid CodeBlock field in each CallFrame. 24 1 25 2010-10-27 Gabor Loki <loki@webkit.org> 2 26 -
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r70588 r70673 677 677 678 678 // Shrink the JS stack, in case stack overflow made it huge. 679 m_registerFile.shrink(callFrame->registers() + callFrame->codeBlock()->m_numCalleeRegisters); 679 Register* highWaterMark = 0; 680 for (CallFrame* callerFrame = callFrame; callerFrame; callerFrame = callerFrame->callerFrame()->removeHostCallFrameFlag()) { 681 CodeBlock* codeBlock = callerFrame->codeBlock(); 682 if (!codeBlock) 683 continue; 684 Register* callerHighWaterMark = callerFrame->registers() + codeBlock->m_numCalleeRegisters; 685 highWaterMark = max(highWaterMark, callerHighWaterMark); 686 } 687 m_registerFile.shrink(highWaterMark); 680 688 681 689 // Unwind the scope chain within the exception handler's call frame. … … 1002 1010 return CallFrameClosure(); 1003 1011 } 1004 // a 0 codeBlock indicates a built-in caller1005 1012 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), argc, function); 1006 1013 CallFrameClosure result = { callFrame, newCallFrame, function, FunctionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->m_numParameters, argc }; … … 1122 1129 CallFrame* newCallFrame = CallFrame::create(m_registerFile.start() + globalRegisterOffset); 1123 1130 1124 // a 0 codeBlock indicates a built-in caller1125 1131 ASSERT(codeBlock->m_numParameters == 1); // 1 parameter for 'this'. 1126 1132 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->m_numParameters, 0); -
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r70496 r70673 199 199 200 200 Label nativeCallThunk = align(); 201 202 emitPutImmediateToCallFrameHeader(0, RegisterFile::CodeBlock); 201 203 202 204 #if CPU(X86_64) -
trunk/JavaScriptCore/jit/JITOpcodes32_64.cpp
r69940 r70673 199 199 Label nativeCallThunk = align(); 200 200 201 emitPutImmediateToCallFrameHeader(0, RegisterFile::CodeBlock); 202 201 203 #if CPU(X86) 202 204 // Load caller frame's scope chain into this callframe so that whatever we call can … … 312 314 Call nativeCall; 313 315 Label nativeCallThunk = align(); 316 317 emitPutImmediateToCallFrameHeader(0, RegisterFile::CodeBlock); 314 318 315 319 #if CPU(X86) -
trunk/LayoutTests/ChangeLog
r70671 r70673 1 2010-10-25 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Added a test for: 6 7 https://bugs.webkit.org/show_bug.cgi?id=41948 8 REGRESSION(r60392): Registerfile can be unwound too far following an exception 9 10 * fast/js/exception-registerfile-shrink-expected.txt: Added. 11 * fast/js/exception-registerfile-shrink.html: Added. 12 * fast/js/script-tests/exception-registerfile-shrink.js: Added. 13 1 14 2010-10-27 Ryosuke Niwa <rniwa@webkit.org> 2 15
Note: See TracChangeset
for help on using the changeset viewer.