Changeset 227636 in webkit


Ignore:
Timestamp:
Jan 25, 2018 2:56:57 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

Rename some local vars from type to typedArrayType for greater clarity.
https://bugs.webkit.org/show_bug.cgi?id=182148
<rdar://problem/36882310>

Reviewed by Saam Barati.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r227617 r227636  
     12018-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
    1142018-01-25  Filip Pizlo  <fpizlo@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r227617 r227636  
    89838983{
    89848984    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));
    89878987    RELEASE_ASSERT(structure.get());
    89888988   
     
    90109010   
    90119011    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) {
    90149014        m_jit.add32(TrustedImm32(7), scratchGPR);
    90159015        m_jit.and32(TrustedImm32(~7), scratchGPR);
     
    90219021    MacroAssembler::Jump done = m_jit.branchTest32(MacroAssembler::Zero, sizeGPR);
    90229022    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);
    90269026        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);
    90299029            m_jit.add32(TrustedImm32(3), scratchGPR);
    90309030            m_jit.urshift32(TrustedImm32(2), scratchGPR);
     
    90589058   
    90599059    addSlowPathGenerator(slowPathCall(
    9060         slowCases, this, operationNewTypedArrayWithSizeForType(type),
     9060        slowCases, this, operationNewTypedArrayWithSizeForType(typedArrayType),
    90619061        resultGPR, structure, sizeGPR, storageGPR));
    90629062   
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r227617 r227636  
    55835583    void compileNewTypedArray()
    55845584    {
    5585         TypedArrayType type = m_node->typedArrayType();
     5585        TypedArrayType typedArrayType = m_node->typedArrayType();
    55865586        JSGlobalObject* globalObject = m_graph.globalObjectFor(m_node->origin.semantic);
    55875587       
    55885588        switch (m_node->child1().useKind()) {
    55895589        case Int32Use: {
    5590             RegisteredStructure structure = m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(type));
     5590            RegisteredStructure structure = m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(typedArrayType));
    55915591
    55925592            LValue size = lowInt32(m_node->child1());
     
    56105610
    56115611            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) {
    56145614                byteSize = m_out.bitAnd(
    56155615                    m_out.add(byteSize, m_out.constIntPtr(7)),
     
    56485648                [=, &vm] (const Vector<Location>& locations) -> RefPtr<LazySlowPath::Generator> {
    56495649                    return createLazyCallGenerator(vm,
    5650                         operationNewTypedArrayWithSizeForType(type), locations[0].directGPR(),
     5650                        operationNewTypedArrayWithSizeForType(typedArrayType), locations[0].directGPR(),
    56515651                        CCallHelpers::TrustedImmPtr(structure.get()), locations[1].directGPR(),
    56525652                        locations[2].directGPR());
     
    56655665
    56665666            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);
    56695669
    56705670            setJSValue(result);
Note: See TracChangeset for help on using the changeset viewer.