Changeset 227636 in webkit
- Timestamp:
- Jan 25, 2018 2:56:57 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r227617 r227636 1 2018-01-25 Mark Lam <mark.lam@apple.com> 2 3 Rename some local vars from type to typedArrayType for greater clarity. 4 https://bugs.webkit.org/show_bug.cgi?id=182148 5 <rdar://problem/36882310> 6 7 Reviewed by Saam Barati. 8 9 * dfg/DFGSpeculativeJIT.cpp: 10 (JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize): 11 * ftl/FTLLowerDFGToB3.cpp: 12 (JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray): 13 1 14 2018-01-25 Filip Pizlo <fpizlo@apple.com> 2 15 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r227617 r227636 8983 8983 { 8984 8984 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic); 8985 TypedArrayType type = node->typedArrayType();8986 RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->typedArrayStructureConcurrently(type ));8985 auto typedArrayType = node->typedArrayType(); 8986 RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->typedArrayStructureConcurrently(typedArrayType)); 8987 8987 RELEASE_ASSERT(structure.get()); 8988 8988 … … 9010 9010 9011 9011 m_jit.move(sizeGPR, scratchGPR); 9012 m_jit.lshift32(TrustedImm32(logElementSize(type )), scratchGPR);9013 if (elementSize(type ) < 8) {9012 m_jit.lshift32(TrustedImm32(logElementSize(typedArrayType)), scratchGPR); 9013 if (elementSize(typedArrayType) < 8) { 9014 9014 m_jit.add32(TrustedImm32(7), scratchGPR); 9015 9015 m_jit.and32(TrustedImm32(~7), scratchGPR); … … 9021 9021 MacroAssembler::Jump done = m_jit.branchTest32(MacroAssembler::Zero, sizeGPR); 9022 9022 m_jit.move(sizeGPR, scratchGPR); 9023 if (elementSize(type ) != 4) {9024 if (elementSize(type ) > 4)9025 m_jit.lshift32(TrustedImm32(logElementSize(type ) - 2), scratchGPR);9023 if (elementSize(typedArrayType) != 4) { 9024 if (elementSize(typedArrayType) > 4) 9025 m_jit.lshift32(TrustedImm32(logElementSize(typedArrayType) - 2), scratchGPR); 9026 9026 else { 9027 if (elementSize(type ) > 1)9028 m_jit.lshift32(TrustedImm32(logElementSize(type )), scratchGPR);9027 if (elementSize(typedArrayType) > 1) 9028 m_jit.lshift32(TrustedImm32(logElementSize(typedArrayType)), scratchGPR); 9029 9029 m_jit.add32(TrustedImm32(3), scratchGPR); 9030 9030 m_jit.urshift32(TrustedImm32(2), scratchGPR); … … 9058 9058 9059 9059 addSlowPathGenerator(slowPathCall( 9060 slowCases, this, operationNewTypedArrayWithSizeForType(type ),9060 slowCases, this, operationNewTypedArrayWithSizeForType(typedArrayType), 9061 9061 resultGPR, structure, sizeGPR, storageGPR)); 9062 9062 -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r227617 r227636 5583 5583 void compileNewTypedArray() 5584 5584 { 5585 TypedArrayType type = m_node->typedArrayType();5585 TypedArrayType typedArrayType = m_node->typedArrayType(); 5586 5586 JSGlobalObject* globalObject = m_graph.globalObjectFor(m_node->origin.semantic); 5587 5587 5588 5588 switch (m_node->child1().useKind()) { 5589 5589 case Int32Use: { 5590 RegisteredStructure structure = m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(type ));5590 RegisteredStructure structure = m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(typedArrayType)); 5591 5591 5592 5592 LValue size = lowInt32(m_node->child1()); … … 5610 5610 5611 5611 LValue byteSize = 5612 m_out.shl(m_out.zeroExtPtr(size), m_out.constInt32(logElementSize(type )));5613 if (elementSize(type ) < 8) {5612 m_out.shl(m_out.zeroExtPtr(size), m_out.constInt32(logElementSize(typedArrayType))); 5613 if (elementSize(typedArrayType) < 8) { 5614 5614 byteSize = m_out.bitAnd( 5615 5615 m_out.add(byteSize, m_out.constIntPtr(7)), … … 5648 5648 [=, &vm] (const Vector<Location>& locations) -> RefPtr<LazySlowPath::Generator> { 5649 5649 return createLazyCallGenerator(vm, 5650 operationNewTypedArrayWithSizeForType(type ), locations[0].directGPR(),5650 operationNewTypedArrayWithSizeForType(typedArrayType), locations[0].directGPR(), 5651 5651 CCallHelpers::TrustedImmPtr(structure.get()), locations[1].directGPR(), 5652 5652 locations[2].directGPR()); … … 5665 5665 5666 5666 LValue result = vmCall( 5667 pointerType(), m_out.operation(operationNewTypedArrayWithOneArgumentForType(type )),5668 m_callFrame, weakPointer(globalObject->typedArrayStructureConcurrently(type )), argument);5667 pointerType(), m_out.operation(operationNewTypedArrayWithOneArgumentForType(typedArrayType)), 5668 m_callFrame, weakPointer(globalObject->typedArrayStructureConcurrently(typedArrayType)), argument); 5669 5669 5670 5670 setJSValue(result);
Note: See TracChangeset
for help on using the changeset viewer.