Ignore:
Timestamp:
Dec 10, 2016, 5:14:37 PM (9 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r209653, r209654, r209663, and
r209673.
https://bugs.webkit.org/show_bug.cgi?id=165739

speedometer crashes (Requested by pizlo on #webkit).

Reverted changesets:

"JSVALUE64: Pass arguments in platform argument registers when
making JavaScript calls"
https://bugs.webkit.org/show_bug.cgi?id=160355
http://trac.webkit.org/changeset/209653

"Unreviewed build fix for 32 bit builds."
http://trac.webkit.org/changeset/209654

"Unreviewed build fix for the CLOOP after r209653"
http://trac.webkit.org/changeset/209663

"REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
https://bugs.webkit.org/show_bug.cgi?id=165728
http://trac.webkit.org/changeset/209673

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/SpecializedThunkJIT.h

    r209653 r209678  
    2929
    3030#include "JIT.h"
    31 #include "JITEntryPoints.h"
    3231#include "JITInlines.h"
    3332#include "JSInterfaceJIT.h"
     
    3938    public:
    4039        static const int ThisArgument = -1;
    41         enum ArgLocation { OnStack, InRegisters };
    42 
    43         SpecializedThunkJIT(VM* vm, int expectedArgCount, AssemblyHelpers::SpillRegisterType spillType = AssemblyHelpers::SpillExactly, ArgLocation argLocation = OnStack)
     40        SpecializedThunkJIT(VM* vm, int expectedArgCount)
    4441            : JSInterfaceJIT(vm)
    4542        {
    46 #if !NUMBER_OF_JS_FUNCTION_ARGUMENT_REGISTERS
    47             UNUSED_PARAM(spillType);
    48             UNUSED_PARAM(argLocation);
    49 #else
    50             if (argLocation == InRegisters) {
    51                 m_stackArgumentsEntry = label();
    52                 fillArgumentRegistersFromFrameBeforePrologue();
    53                 m_registerArgumentsEntry = label();
    54                 emitFunctionPrologue();
    55                 emitSaveThenMaterializeTagRegisters();
    56                 // Check that we have the expected number of arguments
    57                 m_failures.append(branch32(NotEqual, argumentRegisterForArgumentCount(), TrustedImm32(expectedArgCount + 1)));
    58             } else {
    59                 spillArgumentRegistersToFrameBeforePrologue(expectedArgCount + 1, spillType);
    60                 m_stackArgumentsEntry = label();
    61 #endif
    62                 emitFunctionPrologue();
    63                 emitSaveThenMaterializeTagRegisters();
    64                 // Check that we have the expected number of arguments
    65                 m_failures.append(branch32(NotEqual, payloadFor(CallFrameSlot::argumentCount), TrustedImm32(expectedArgCount + 1)));
    66 #if NUMBER_OF_JS_FUNCTION_ARGUMENT_REGISTERS
    67                 }
    68 #endif
     43            emitFunctionPrologue();
     44            emitSaveThenMaterializeTagRegisters();
     45            // Check that we have the expected number of arguments
     46            m_failures.append(branch32(NotEqual, payloadFor(CallFrameSlot::argumentCount), TrustedImm32(expectedArgCount + 1)));
    6947        }
    7048       
     
    7250            : JSInterfaceJIT(vm)
    7351        {
    74 #if USE(JSVALUE64)
    75             spillArgumentRegistersToFrameBeforePrologue();
    76             m_stackArgumentsEntry = Label();
    77 #endif
    7852            emitFunctionPrologue();
    7953            emitSaveThenMaterializeTagRegisters();
     
    12195            m_failures.append(conversionFailed);
    12296        }
    123 
    124         void checkJSStringArgument(VM& vm, RegisterID argument)
    125         {
    126             m_failures.append(emitJumpIfNotJSCell(argument));
    127             m_failures.append(branchStructure(NotEqual,
    128                 Address(argument, JSCell::structureIDOffset()),
    129                 vm.stringStructure.get()));
    130         }
    13197       
    13298        void appendFailure(const Jump& failure)
     
    134100            m_failures.append(failure);
    135101        }
    136 
    137         void linkFailureHere()
    138         {
    139             m_failures.link(this);
    140             m_failures.clear();
    141         }
    142 
    143102#if USE(JSVALUE64)
    144103        void returnJSValue(RegisterID src)
     
    206165        }
    207166       
    208         JITEntryPointsWithRef finalize(MacroAssemblerCodePtr fallback, const char* thunkKind)
     167        MacroAssemblerCodeRef finalize(MacroAssemblerCodePtr fallback, const char* thunkKind)
    209168        {
    210169            LinkBuffer patchBuffer(*m_vm, *this, GLOBAL_THUNK_ID);
     
    212171            for (unsigned i = 0; i < m_calls.size(); i++)
    213172                patchBuffer.link(m_calls[i].first, m_calls[i].second);
    214 
    215             MacroAssemblerCodePtr stackEntry;
    216             if (m_stackArgumentsEntry.isSet())
    217                 stackEntry = patchBuffer.locationOf(m_stackArgumentsEntry);
    218             MacroAssemblerCodePtr registerEntry;
    219             if (m_registerArgumentsEntry.isSet())
    220                 registerEntry = patchBuffer.locationOf(m_registerArgumentsEntry);
    221 
    222             MacroAssemblerCodeRef entry = FINALIZE_CODE(patchBuffer, ("Specialized thunk for %s", thunkKind));
    223 
    224             if (m_stackArgumentsEntry.isSet()) {
    225                 if (m_registerArgumentsEntry.isSet())
    226                     return JITEntryPointsWithRef(entry, registerEntry, registerEntry, registerEntry, stackEntry, stackEntry);
    227                 return JITEntryPointsWithRef(entry, entry.code(), entry.code(), entry.code(), stackEntry, stackEntry);
    228             }
    229 
    230             return JITEntryPointsWithRef(entry, entry.code(), entry.code());
     173            return FINALIZE_CODE(patchBuffer, ("Specialized thunk for %s", thunkKind));
    231174        }
    232175
     
    265208       
    266209        MacroAssembler::JumpList m_failures;
    267         MacroAssembler::Label m_registerArgumentsEntry;
    268         MacroAssembler::Label m_stackArgumentsEntry;
    269210        Vector<std::pair<Call, FunctionPtr>> m_calls;
    270211    };
Note: See TracChangeset for help on using the changeset viewer.