Changeset 206212 in webkit
- Timestamp:
- Sep 21, 2016 9:26:13 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r206207 r206212 1 2016-09-21 Michael Saboff <msaboff@apple.com> 2 3 FTL needs to reserve callee stack space in bytes 4 https://bugs.webkit.org/show_bug.cgi?id=162324 5 6 Reviewed by Geoffrey Garen. 7 8 Changed two instances where we call B3::Procedure::requestCallArgAreaSize() with the 9 number of JSValue sized objects of stack space instead of bytes. The correct units 10 to use is bytes. 11 12 Renamed both the Air and B3 related callArgAreaSize() to callArgAreaSizeInBytes(). 13 14 No new tests as this doesn't surface as an issue when arguments are passed on the stack. 15 16 * b3/B3Procedure.cpp: 17 (JSC::B3::Procedure::callArgAreaSizeInBytes): 18 (JSC::B3::Procedure::requestCallArgAreaSizeInBytes): 19 (JSC::B3::Procedure::callArgAreaSize): Deleted. 20 (JSC::B3::Procedure::requestCallArgAreaSize): Deleted. 21 * b3/B3Procedure.h: 22 * b3/air/AirAllocateStack.cpp: 23 (JSC::B3::Air::allocateStack): 24 * b3/air/AirCCallingConvention.cpp: 25 (JSC::B3::Air::computeCCallingConvention): 26 * b3/air/AirCode.h: 27 (JSC::B3::Air::Code::callArgAreaSizeInBytes): 28 (JSC::B3::Air::Code::requestCallArgAreaSizeInBytes): 29 (JSC::B3::Air::Code::callArgAreaSize): Deleted. 30 (JSC::B3::Air::Code::requestCallArgAreaSize): Deleted. 31 * ftl/FTLLowerDFGToB3.cpp: 32 (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct): 33 (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs): 34 (JSC::FTL::DFG::LowerDFGToB3::compileCallEval): 35 1 36 2016-09-21 Csaba Osztrogonác <ossy@webkit.org> 2 37 -
trunk/Source/JavaScriptCore/b3/B3Procedure.cpp
r203670 r206212 296 296 } 297 297 298 unsigned Procedure::callArgAreaSize () const299 { 300 return code().callArgAreaSize ();301 } 302 303 void Procedure::requestCallArgAreaSize (unsigned size)304 { 305 code().requestCallArgAreaSize (size);298 unsigned Procedure::callArgAreaSizeInBytes() const 299 { 300 return code().callArgAreaSizeInBytes(); 301 } 302 303 void Procedure::requestCallArgAreaSizeInBytes(unsigned size) 304 { 305 code().requestCallArgAreaSizeInBytes(size); 306 306 } 307 307 -
trunk/Source/JavaScriptCore/b3/B3Procedure.h
r204920 r206212 211 211 Air::Code& code() { return *m_code; } 212 212 213 unsigned callArgAreaSize () const;214 void requestCallArgAreaSize (unsigned size);213 unsigned callArgAreaSizeInBytes() const; 214 void requestCallArgAreaSizeInBytes(unsigned size); 215 215 216 216 JS_EXPORT_PRIVATE unsigned frameSize() const; -
trunk/Source/JavaScriptCore/b3/air/AirAllocateStack.cpp
r201783 r206212 241 241 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=150454 242 242 ASSERT(arg.offset() >= 0); 243 code.requestCallArgAreaSize (arg.offset() + 8);243 code.requestCallArgAreaSizeInBytes(arg.offset() + 8); 244 244 } 245 245 } … … 247 247 } 248 248 249 code.setFrameSize(frameSizeForStackSlots + code.callArgAreaSize ());249 code.setFrameSize(frameSizeForStackSlots + code.callArgAreaSizeInBytes()); 250 250 251 251 // Finally, transform the code to use Addr's instead of StackSlot's. This is a lossless -
trunk/Source/JavaScriptCore/b3/air/AirCCallingConvention.cpp
r195139 r206212 86 86 marshallCCallArgument(gpArgumentCount, fpArgumentCount, stackOffset, value->child(i))); 87 87 } 88 code.requestCallArgAreaSize (WTF::roundUpToMultipleOf(stackAlignmentBytes(), stackOffset));88 code.requestCallArgAreaSizeInBytes(WTF::roundUpToMultipleOf(stackAlignmentBytes(), stackOffset)); 89 89 return result; 90 90 } -
trunk/Source/JavaScriptCore/b3/air/AirCode.h
r204920 r206212 102 102 } 103 103 104 unsigned callArgAreaSize () const { return m_callArgAreaSize; }104 unsigned callArgAreaSizeInBytes() const { return m_callArgAreaSize; } 105 105 106 106 // You can call this before code generation to force a minimum call arg area size. 107 void requestCallArgAreaSize (unsigned size)107 void requestCallArgAreaSizeInBytes(unsigned size) 108 108 { 109 109 m_callArgAreaSize = std::max( -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r206136 r206212 5294 5294 LValue jsCallee = lowJSValue(m_graph.varArgChild(node, 0)); 5295 5295 5296 unsigned frameSize = CallFrame::headerSizeInRegisters + numArgs;5297 unsigned alignedFrameSize = WTF::roundUpToMultipleOf(stackAlignment Registers(), frameSize);5296 unsigned frameSize = (CallFrame::headerSizeInRegisters + numArgs) * sizeof(EncodedJSValue); 5297 unsigned alignedFrameSize = WTF::roundUpToMultipleOf(stackAlignmentBytes(), frameSize); 5298 5298 5299 5299 // JS->JS calling convention requires that the caller allows this much space on top of stack to … … 5305 5305 // shouldn't rely on Air to infer the trashed stack property based on the arguments it ends 5306 5306 // up seeing. 5307 m_proc.requestCallArgAreaSize (alignedFrameSize);5307 m_proc.requestCallArgAreaSizeInBytes(alignedFrameSize); 5308 5308 5309 5309 // Collect the arguments, since this can generate code and we want to generate it before we emit … … 5555 5555 WTF::roundUpToMultipleOf(stackAlignmentBytes(), 5 * sizeof(EncodedJSValue)); 5556 5556 5557 m_proc.requestCallArgAreaSize (minimumJSCallAreaSize);5557 m_proc.requestCallArgAreaSizeInBytes(minimumJSCallAreaSize); 5558 5558 5559 5559 CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite(); … … 5781 5781 LValue jsCallee = lowJSValue(m_graph.varArgChild(node, 0)); 5782 5782 5783 unsigned frameSize = CallFrame::headerSizeInRegisters + numArgs;5784 unsigned alignedFrameSize = WTF::roundUpToMultipleOf(stackAlignment Registers(), frameSize);5785 5786 m_proc.requestCallArgAreaSize (alignedFrameSize);5783 unsigned frameSize = (CallFrame::headerSizeInRegisters + numArgs) * sizeof(EncodedJSValue); 5784 unsigned alignedFrameSize = WTF::roundUpToMultipleOf(stackAlignmentBytes(), frameSize); 5785 5786 m_proc.requestCallArgAreaSizeInBytes(alignedFrameSize); 5787 5787 5788 5788 Vector<ConstrainedValue> arguments;
Note: See TracChangeset
for help on using the changeset viewer.