Changeset 158237 in webkit
- Timestamp:
- Oct 29, 2013 4:15:09 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/fast/forms/select/popup-closes-on-blur-expected.txt
r147548 r158237 4 4 5 5 6 PASS internals.isSelectPopupVisible(popup) is true 6 FAIL internals.isSelectPopupVisible(popup) should be true. Was false. 7 7 PASS internals.isSelectPopupVisible(popup) is false 8 8 PASS successfullyParsed is true -
trunk/Source/JavaScriptCore/ChangeLog
r158208 r158237 1 2013-10-29 Michael Saboff <msaboff@apple.com> 2 3 Change local variable register allocation to start at offset -1 4 https://bugs.webkit.org/show_bug.cgi?id=123182 5 6 Reviewed by Geoffrey Garen. 7 8 Adjusted the virtual register mapping down by one slot. Reduced 9 the CallFrame header slots offsets by one. They now start at 0. 10 Changed arity fixup to no longer skip passed register slot 0 as this 11 is now part of the CallFrame header. 12 13 * bytecode/VirtualRegister.h: 14 (JSC::operandIsLocal): 15 (JSC::operandIsArgument): 16 (JSC::VirtualRegister::localToOperand): 17 (JSC::VirtualRegister::operandToLocal): 18 Adjusted functions for shift in mapping from local to register offset. 19 20 * dfg/DFGByteCodeParser.cpp: 21 (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal): 22 (JSC::DFG::ByteCodeParser::addCall): 23 (JSC::DFG::ByteCodeParser::handleInlining): 24 (JSC::DFG::ByteCodeParser::parseBlock): 25 * dfg/DFGVariableEventStream.cpp: 26 (JSC::DFG::VariableEventStream::reconstruct): 27 * dfg/DFGVirtualRegisterAllocationPhase.cpp: 28 (JSC::DFG::VirtualRegisterAllocationPhase::run): 29 * interpreter/CallFrame.h: 30 (JSC::ExecState::frameExtent): 31 (JSC::ExecState::offsetFor): 32 * interpreter/Interpreter.cpp: 33 (JSC::loadVarargs): 34 (JSC::Interpreter::dumpRegisters): 35 (JSC::Interpreter::executeCall): 36 * llint/LLIntData.cpp: 37 (JSC::LLInt::Data::performAssertions): 38 * llint/LowLevelInterpreter.asm: 39 Adjusted math to accomodate for shift in call frame slots. 40 41 * dfg/DFGJITCompiler.cpp: 42 (JSC::DFG::JITCompiler::compileFunction): 43 * dfg/DFGSpeculativeJIT.h: 44 (JSC::DFG::SpeculativeJIT::calleeFrameOffset): 45 * interpreter/CallFrame.cpp: 46 (JSC::CallFrame::frameExtentInternal): 47 * interpreter/JSStackInlines.h: 48 (JSC::JSStack::pushFrame): 49 * jit/JIT.cpp: 50 (JSC::JIT::privateCompile): 51 * jit/JITOperations.cpp: 52 * llint/LLIntSlowPaths.cpp: 53 (JSC::LLInt::llint_slow_path_stack_check): 54 * runtime/CommonSlowPaths.h: 55 (JSC::CommonSlowPaths::arityCheckFor): 56 Fixed offset calculation to use VirtualRegister and related calculation instead of 57 doing seperate calculations. 58 59 * interpreter/JSStack.h: 60 Adjusted CallFrame slots down by one. Did some miscellaneous fixing of dumpRegisters() 61 in the process of testing the fixes. 62 63 * jit/ThunkGenerators.cpp: 64 (JSC::arityFixup): 65 Changed arity fixup to no longer skip passed register slot 0 as this 66 is now part of the CallFrame header. 67 68 * llint/LowLevelInterpreter32_64.asm: 69 * llint/LowLevelInterpreter64.asm: 70 Changed arity fixup to no longer skip passed register slot 0 as this 71 is now part of the CallFrame header. Updated op_enter processing for 72 the change in local registers. 73 74 * runtime/JSGlobalObject.h: 75 Removed the now unneeded extra slot in the global callframe 76 1 77 2013-10-29 Julien Brianceau <jbriance@cisco.com> 2 78 -
trunk/Source/JavaScriptCore/bytecode/VirtualRegister.h
r156511 r158237 36 36 inline bool operandIsLocal(int operand) 37 37 { 38 return operand < =0;38 return operand < 0; 39 39 } 40 40 41 41 inline bool operandIsArgument(int operand) 42 42 { 43 return operand > 0;43 return operand >= 0; 44 44 } 45 45 … … 74 74 static const int s_firstConstantRegisterIndex = 0x40000000; 75 75 76 static int localToOperand(int local) { return - local; }77 static int operandToLocal(int operand) { return - operand; }76 static int localToOperand(int local) { return -1 - local; } 77 static int operandToLocal(int operand) { return -1 - operand; } 78 78 static int operandToArgument(int operand) { return operand - CallFrame::thisArgumentOffset(); } 79 79 static int argumentToOperand(int argument) { return argument + CallFrame::thisArgumentOffset(); } -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r158141 r158237 392 392 if (!inlineCallFrame) 393 393 break; 394 if (operand.offset() < =static_cast<int>(inlineCallFrame->stackOffset + JSStack::CallFrameHeaderSize))394 if (operand.offset() < static_cast<int>(inlineCallFrame->stackOffset + JSStack::CallFrameHeaderSize)) 395 395 continue; 396 396 if (operand.offset() == inlineCallFrame->stackOffset + CallFrame::thisArgumentOffset()) 397 397 continue; 398 if (operand.offset() > static_cast<int>(inlineCallFrame->stackOffset + JSStack::CallFrameHeaderSize+ inlineCallFrame->arguments.size()))398 if (operand.offset() >= static_cast<int>(inlineCallFrame->stackOffset + CallFrame::thisArgumentOffset() + inlineCallFrame->arguments.size())) 399 399 continue; 400 400 int argument = VirtualRegister(operand.offset() - inlineCallFrame->stackOffset).toArgument(); … … 770 770 addVarArgChild(get(VirtualRegister(currentInstruction[2].u.operand))); 771 771 int argCount = currentInstruction[3].u.operand; 772 if (JSStack:: CallFrameHeaderSize+ (unsigned)argCount > m_parameterSlots)773 m_parameterSlots = JSStack:: CallFrameHeaderSize+ argCount;772 if (JSStack::ThisArgument + (unsigned)argCount > m_parameterSlots) 773 m_parameterSlots = JSStack::ThisArgument + argCount; 774 774 775 775 int registerOffset = -currentInstruction[4].u.operand; … … 1291 1291 1292 1292 // Make sure that we have enough locals. 1293 unsigned newNumLocals = VirtualRegister(inlineCallFrameStart).toLocal() + JSStack::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;1293 unsigned newNumLocals = VirtualRegister(inlineCallFrameStart).toLocal() + 1 + JSStack::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters; 1294 1294 if (newNumLocals > m_numLocals) { 1295 1295 m_numLocals = newNumLocals; … … 2979 2979 2980 2980 unsigned argCount = inlineCallFrame()->arguments.size(); 2981 if (JSStack:: CallFrameHeaderSize+ argCount > m_parameterSlots)2982 m_parameterSlots = JSStack:: CallFrameHeaderSize+ argCount;2981 if (JSStack::ThisArgument + argCount > m_parameterSlots) 2982 m_parameterSlots = JSStack::ThisArgument + argCount; 2983 2983 2984 2984 addVarArgChild(get(VirtualRegister(currentInstruction[2].u.operand))); // callee -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
r158141 r158237 333 333 // Plant a check that sufficient space is available in the JSStack. 334 334 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=56291 335 addPtr(TrustedImm32( -m_codeBlock->m_numCalleeRegisters* sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);335 addPtr(TrustedImm32(virtualRegisterForLocal(m_codeBlock->m_numCalleeRegisters).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1); 336 336 Jump stackCheck = branchPtr(Above, AbsoluteAddress(m_vm->interpreter->stack().addressOfEnd()), GPRInfo::regT1); 337 337 // Return here after stack check. -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r158116 r158237 738 738 ptrdiff_t calleeFrameOffset(int numArgs) 739 739 { 740 return -(m_jit.graph().m_nextMachineLocal + JSStack::CallFrameHeaderSize + numArgs) * sizeof(Register);740 return virtualRegisterForLocal(m_jit.graph().m_nextMachineLocal + JSStack::CallFrameHeaderSize + numArgs).offset() * sizeof(Register); 741 741 } 742 742 -
trunk/Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp
r156747 r158237 116 116 unsigned numVariables; 117 117 if (codeOrigin.inlineCallFrame) 118 numVariables = baselineCodeBlockForInlineCallFrame(codeOrigin.inlineCallFrame)->m_numCalleeRegisters + VirtualRegister(codeOrigin.inlineCallFrame->stackOffset).toLocal() ;118 numVariables = baselineCodeBlockForInlineCallFrame(codeOrigin.inlineCallFrame)->m_numCalleeRegisters + VirtualRegister(codeOrigin.inlineCallFrame->stackOffset).toLocal() + 1; 119 119 else 120 120 numVariables = baselineCodeBlock->m_numCalleeRegisters; -
trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp
r157576 r158237 129 129 InlineCallFrame* inlineCallFrame = *iter; 130 130 CodeBlock* codeBlock = baselineCodeBlockForInlineCallFrame(inlineCallFrame); 131 unsigned requiredCalleeRegisters = VirtualRegister(inlineCallFrame->stackOffset).toLocal() + codeBlock->m_numCalleeRegisters;131 unsigned requiredCalleeRegisters = VirtualRegister(inlineCallFrame->stackOffset).toLocal() + 1 + codeBlock->m_numCalleeRegisters; 132 132 if (requiredCalleeRegisters > calleeRegisters) 133 133 calleeRegisters = requiredCalleeRegisters; -
trunk/Source/JavaScriptCore/interpreter/CallFrame.cpp
r156242 r158237 120 120 CodeBlock* codeBlock = this->codeBlock(); 121 121 ASSERT(codeBlock); 122 return registers() - codeBlock->m_numCalleeRegisters;122 return registers() + virtualRegisterForLocal(codeBlock->m_numCalleeRegisters).offset(); 123 123 } 124 124 -
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r157050 r158237 180 180 { 181 181 if (!codeBlock()) 182 return registers() ;182 return registers() - 1; 183 183 return frameExtentInternal(); 184 184 } 185 185 186 186 Register* frameExtentInternal(); 187 187 188 188 #if USE(JSVALUE32_64) 189 189 Instruction* currentVPC() const … … 225 225 size_t argumentCount() const { return argumentCountIncludingThis() - 1; } 226 226 size_t argumentCountIncludingThis() const { return this[JSStack::ArgumentCount].payload(); } 227 static int argumentOffset(int argument) { return ( s_firstArgumentOffset + argument); }228 static int argumentOffsetIncludingThis(int argument) { return ( s_thisArgumentOffset + argument); }227 static int argumentOffset(int argument) { return (JSStack::FirstArgument + argument); } 228 static int argumentOffsetIncludingThis(int argument) { return (JSStack::ThisArgument + argument); } 229 229 230 230 // In the following (argument() and setArgument()), the 'argument' … … 259 259 JSValue argumentAfterCapture(size_t argument); 260 260 261 static int offsetFor(size_t argumentCountIncludingThis) { return argumentCountIncludingThis + JSStack:: CallFrameHeaderSize; }261 static int offsetFor(size_t argumentCountIncludingThis) { return argumentCountIncludingThis + JSStack::ThisArgument - 1; } 262 262 263 263 // FIXME: Remove these. … … 289 289 private: 290 290 static const intptr_t HostCallFrameFlag = 1; 291 static const int s_thisArgumentOffset = JSStack::CallFrameHeaderSize + 1;292 static const int s_firstArgumentOffset = s_thisArgumentOffset + 1;293 291 294 292 #ifndef NDEBUG … … 311 309 312 310 // The offset is defined (based on argumentOffset()) to be: 313 // offset = s_firstArgumentOffset - argIndex;311 // offset = JSStack::FirstArgument - argIndex; 314 312 // Hence: 315 // argIndex = s_firstArgumentOffset - offset;316 size_t argIndex = offset - s_firstArgumentOffset;313 // argIndex = JSStack::FirstArgument - offset; 314 size_t argIndex = offset - JSStack::FirstArgument; 317 315 return argIndex; 318 316 } -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r157746 r158237 155 155 if (!arguments) { // f.apply(x, arguments), with arguments unmodified. 156 156 unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis(); 157 CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + firstFreeRegister - argumentCountIncludingThis - JSStack::CallFrameHeaderSize );157 CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + firstFreeRegister - argumentCountIncludingThis - JSStack::CallFrameHeaderSize - 1); 158 158 if (argumentCountIncludingThis > Arguments::MaxArguments + 1 || !stack->grow(newCallFrame->registers())) { 159 159 callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); … … 169 169 170 170 if (arguments.isUndefinedOrNull()) { 171 CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + firstFreeRegister - 1 - JSStack::CallFrameHeaderSize );171 CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + firstFreeRegister - 1 - JSStack::CallFrameHeaderSize - 1); 172 172 if (!stack->grow(newCallFrame->registers())) { 173 173 callFrame->vm().throwException(callFrame, createStackOverflowError(callFrame)); … … 296 296 visitor->computeLineAndColumn(line, unusedColumn); 297 297 dataLogF("[ReturnVPC] | %10p | %d (line %d)\n", m_it, visitor->bytecodeOffset(), line); 298 ++m_it;298 --m_it; 299 299 return StackVisitor::Done; 300 300 } … … 316 316 const Register* end; 317 317 318 it = callFrame->registers() + JSStack:: CallFrameHeaderSize + callFrame->argumentCountIncludingThis();319 end = callFrame->registers() + JSStack:: CallFrameHeaderSize;318 it = callFrame->registers() + JSStack::ThisArgument + callFrame->argumentCount(); 319 end = callFrame->registers() + JSStack::ThisArgument - 1; 320 320 while (it > end) { 321 321 JSValue v = it->jsValue(); … … 323 323 String name = codeBlock->nameForRegister(VirtualRegister(registerNumber)); 324 324 dataLogF("[r% 3d %14s] | %10p | %-16s 0x%lld \n", registerNumber, name.ascii().data(), it, toCString(v).data(), (long long)JSValue::encode(v)); 325 it++;325 --it; 326 326 } 327 327 … … 348 348 dataLogF("-----------------------------------------------------------------------------\n"); 349 349 350 int registerCount = 0;351 352 350 end = it - codeBlock->m_numVars; 353 351 if (it != end) { … … 358 356 dataLogF("[r% 3d %14s] | %10p | %-16s 0x%lld \n", registerNumber, name.ascii().data(), it, toCString(v).data(), (long long)JSValue::encode(v)); 359 357 --it; 360 --registerCount;361 358 } while (it != end); 362 359 } 363 360 dataLogF("-----------------------------------------------------------------------------\n"); 364 361 365 end = it + codeBlock->m_numCalleeRegisters -codeBlock->m_numVars;362 end = it - codeBlock->m_numCalleeRegisters + codeBlock->m_numVars; 366 363 if (it != end) { 367 364 do { 368 365 JSValue v = (*it).jsValue(); 369 dataLogF("[r% 3d] | %10p | %-16s 0x%lld \n", registerCount, it, toCString(v).data(), (long long)JSValue::encode(v));370 ++it;371 ++registerCount;366 int registerNumber = it - callFrame->registers(); 367 dataLogF("[r% 3d] | %10p | %-16s 0x%lld \n", registerNumber, it, toCString(v).data(), (long long)JSValue::encode(v)); 368 --it; 372 369 } while (it != end); 373 370 } -
trunk/Source/JavaScriptCore/interpreter/JSStack.h
r155711 r158237 54 54 enum CallFrameHeaderEntry { 55 55 CallFrameHeaderSize = 6, 56 57 ArgumentCount = 6, 58 CallerFrame = 5, 59 Callee = 4, 60 ScopeChain = 3, 61 ReturnPC = 2, // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*. 62 CodeBlock = 1, 56 FirstArgument = 7, 57 ThisArgument = 6, 58 ArgumentCount = 5, 59 CallerFrame = 4, 60 Callee = 3, 61 ScopeChain = 2, 62 ReturnPC = 1, // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*. 63 CodeBlock = 0, 63 64 }; 64 65 -
trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h
r155711 r158237 73 73 Register* newEnd = newCallFrameSlot; 74 74 if (!!codeBlock) 75 newEnd -= codeBlock->m_numCalleeRegisters;75 newEnd += virtualRegisterForLocal(codeBlock->m_numCalleeRegisters).offset(); 76 76 77 77 // Ensure that we have the needed stack capacity to push the new frame: -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r157685 r158237 587 587 #endif 588 588 589 addPtr(TrustedImm32( -m_codeBlock->m_numCalleeRegisters* sizeof(Register)), callFrameRegister, regT1);589 addPtr(TrustedImm32(virtualRegisterForLocal(m_codeBlock->m_numCalleeRegisters).offset() * sizeof(Register)), callFrameRegister, regT1); 590 590 stackCheck = branchPtr(Above, AbsoluteAddress(m_vm->interpreter->stack().addressOfEnd()), regT1); 591 591 } -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r157660 r158237 80 80 JSStack& stack = vm->interpreter->stack(); 81 81 82 if (UNLIKELY(!stack.grow(&exec->registers()[ -codeBlock->m_numCalleeRegisters])))82 if (UNLIKELY(!stack.grow(&exec->registers()[virtualRegisterForLocal(codeBlock->m_numCalleeRegisters).offset()]))) 83 83 vm->throwException(callerFrame, createStackOverflowError(callerFrame)); 84 84 } … … 1718 1718 HIDE_SYMBOL(getHostCallReturnValue) "\n" 1719 1719 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1720 "mov 40(%r13), %r13\n"1720 "mov 32(%r13), %r13\n" 1721 1721 "mov %r13, %rdi\n" 1722 1722 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1729 1729 HIDE_SYMBOL(getHostCallReturnValue) "\n" 1730 1730 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1731 "mov 40(%edi), %edi\n"1731 "mov 32(%edi), %edi\n" 1732 1732 "mov %edi, 4(%esp)\n" 1733 1733 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1743 1743 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" 1744 1744 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1745 "ldr r5, [r5, # 40]" "\n"1745 "ldr r5, [r5, #32]" "\n" 1746 1746 "mov r0, r5" "\n" 1747 1747 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1755 1755 INLINE_ARM_FUNCTION(getHostCallReturnValue) 1756 1756 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1757 "ldr r5, [r5, # 40]" "\n"1757 "ldr r5, [r5, #32]" "\n" 1758 1758 "mov r0, r5" "\n" 1759 1759 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1767 1767 HIDE_SYMBOL(getHostCallReturnValue) "\n" 1768 1768 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1769 "ldur x25, [x25, #- 40]" "\n"1769 "ldur x25, [x25, #-32]" "\n" 1770 1770 "mov x0, x25" "\n" 1771 1771 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1779 1779 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1780 1780 LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState) 1781 "lw $s0, 40($s0)" "\n"1781 "lw $s0, 32($s0)" "\n" 1782 1782 "move $a0, $s0" "\n" 1783 1783 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" … … 1790 1790 HIDE_SYMBOL(getHostCallReturnValue) "\n" 1791 1791 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 1792 "add # 40, r14" "\n"1792 "add #32, r14" "\n" 1793 1793 "mov.l @r14, r14" "\n" 1794 1794 "mov r14, r4" "\n" … … 1805 1805 { 1806 1806 __asm { 1807 mov edi, [edi + 40];1807 mov edi, [edi + 32]; 1808 1808 mov [esp + 4], edi; 1809 1809 jmp getHostCallReturnValueWithExecState -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp
r157636 r158237 500 500 # endif 501 501 jit.neg64(JSInterfaceJIT::regT0); 502 jit. addPtr(JSInterfaceJIT::TrustedImm32(8),JSInterfaceJIT::callFrameRegister, JSInterfaceJIT::regT3);502 jit.move(JSInterfaceJIT::callFrameRegister, JSInterfaceJIT::regT3); 503 503 jit.load32(JSInterfaceJIT::Address(JSInterfaceJIT::callFrameRegister, JSStack::ArgumentCount * 8), JSInterfaceJIT::regT2); 504 504 jit.add32(JSInterfaceJIT::TrustedImm32(JSStack::CallFrameHeaderSize), JSInterfaceJIT::regT2); … … 532 532 # endif 533 533 jit.neg32(JSInterfaceJIT::regT0); 534 jit. addPtr(JSInterfaceJIT::TrustedImm32(8),JSInterfaceJIT::callFrameRegister, JSInterfaceJIT::regT3);534 jit.move(JSInterfaceJIT::callFrameRegister, JSInterfaceJIT::regT3); 535 535 jit.load32(JSInterfaceJIT::Address(JSInterfaceJIT::callFrameRegister, JSStack::ArgumentCount * 8), JSInterfaceJIT::regT2); 536 536 jit.add32(JSInterfaceJIT::TrustedImm32(JSStack::CallFrameHeaderSize), JSInterfaceJIT::regT2); -
trunk/Source/JavaScriptCore/llint/LLIntData.cpp
r156837 r158237 72 72 // prepared to change LowLevelInterpreter.asm as well!! 73 73 ASSERT(JSStack::CallFrameHeaderSize * 8 == 48); 74 ASSERT(JSStack::ArgumentCount * 8 == 4 8);75 ASSERT(JSStack::CallerFrame * 8 == 40);76 ASSERT(JSStack::Callee * 8 == 32);77 ASSERT(JSStack::ScopeChain * 8 == 24);78 ASSERT(JSStack::ReturnPC * 8 == 16);79 ASSERT(JSStack::CodeBlock * 8 == 8);80 ASSERT(CallFrame::argumentOffsetIncludingThis(0) == JSStack:: CallFrameHeaderSize + 1);74 ASSERT(JSStack::ArgumentCount * 8 == 40); 75 ASSERT(JSStack::CallerFrame * 8 == 32); 76 ASSERT(JSStack::Callee * 8 == 24); 77 ASSERT(JSStack::ScopeChain * 8 == 16); 78 ASSERT(JSStack::ReturnPC * 8 == 8); 79 ASSERT(JSStack::CodeBlock * 8 == 0); 80 ASSERT(CallFrame::argumentOffsetIncludingThis(0) == JSStack::ThisArgument); 81 81 #if CPU(BIG_ENDIAN) 82 82 ASSERT(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag) == 0); -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r157868 r158237 428 428 dataLogF("Current end is at %p.\n", exec->vm().interpreter->stack().end()); 429 429 #endif 430 ASSERT(!exec->vm().interpreter->stack().containsAddress(&exec->registers()[ -exec->codeBlock()->m_numCalleeRegisters]));431 if (UNLIKELY(!vm.interpreter->stack().grow(&exec->registers()[ -exec->codeBlock()->m_numCalleeRegisters]))) {430 ASSERT(!exec->vm().interpreter->stack().containsAddress(&exec->registers()[virtualRegisterForLocal(exec->codeBlock()->m_numCalleeRegisters).offset()])); 431 if (UNLIKELY(!vm.interpreter->stack().grow(&exec->registers()[virtualRegisterForLocal(exec->codeBlock()->m_numCalleeRegisters).offset()]))) { 432 432 exec = exec->callerFrame(); 433 433 CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec)); -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r157746 r158237 34 34 const CallFrameHeaderSize = 48 35 35 const CallFrameHeaderSlots = 6 36 const ArgumentCount = 4 837 const CallerFrame = 4038 const Callee = 3239 const ScopeChain = 2440 const ReturnPC = 1641 const CodeBlock = 842 43 const ThisArgumentOffset = CallFrameHeaderSize+ 836 const ArgumentCount = 40 37 const CallerFrame = 32 38 const Callee = 24 39 const ScopeChain = 16 40 const ReturnPC = 8 41 const CodeBlock = 0 42 43 const ThisArgumentOffset = ArgumentCount + 8 44 44 45 45 # Some value representation constants. … … 373 373 # Check stack height. 374 374 loadi CodeBlock::m_numCalleeRegisters[t1], t0 375 addi 1, t0 # Account that local0 goes at slot -1 375 376 loadp CodeBlock::m_vm[t1], t2 376 377 loadp VM::interpreter[t2], t2 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r157937 r158237 317 317 negi t1 318 318 move cfr, t3 319 addp 8, t3320 319 loadi PayloadOffset + ArgumentCount[cfr], t2 321 320 addi CallFrameHeaderSlots, t2 … … 359 358 negi t2 360 359 .opEnterLoop: 361 addi 1, t2362 360 storei t0, TagOffset[cfr, t2, 8] 363 361 storei t1, PayloadOffset[cfr, t2, 8] 362 addi 1, t2 364 363 btinz t2, .opEnterLoop 365 364 .opEnterDone: -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r157937 r158237 213 213 negq t1 214 214 move cfr, t3 215 addp 8, t3216 215 loadi PayloadOffset + ArgumentCount[cfr], t2 217 216 addi CallFrameHeaderSlots, t2 … … 253 252 sxi2q t2, t2 254 253 .opEnterLoop: 254 storeq t0, [cfr, t2, 8] 255 255 addq 1, t2 256 storeq t0, [cfr, t2, 8]257 256 btqnz t2, .opEnterLoop 258 257 .opEnterDone: -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
r156376 r158237 54 54 55 55 // This ensures enough space for the worst case scenario of zero arguments passed by the caller. 56 if (!stack->grow(exec->registers() - newCodeBlock->numParameters() - newCodeBlock->m_numCalleeRegisters))56 if (!stack->grow(exec->registers() - newCodeBlock->numParameters() + virtualRegisterForLocal(newCodeBlock->m_numCalleeRegisters).offset())) 57 57 return -1; 58 58 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r157764 r158237 145 145 protected: 146 146 147 // Add one so we don't need to index with -1 to get current frame pointer. 148 // An index of -1 is an error for some compilers. 149 Register m_globalCallFrame[JSStack::CallFrameHeaderSize + 1]; 147 Register m_globalCallFrame[JSStack::CallFrameHeaderSize]; 150 148 151 149 WriteBarrier<JSObject> m_globalThis;
Note: See TracChangeset
for help on using the changeset viewer.