Ignore:
Timestamp:
Jul 5, 2011, 11:35:44 PM (14 years ago)
Author:
[email protected]
Message:

2011-07-05 Filip Pizlo <[email protected]>

DFG JIT virtual call implementation is inefficient.
https://bugs.webkit.org/show_bug.cgi?id=63974

Reviewed by Gavin Barraclough.

  • dfg/DFGOperations.cpp:
  • runtime/Executable.h: (JSC::ExecutableBase::generatedJITCodeForCallWithArityCheck): (JSC::ExecutableBase::generatedJITCodeForConstructWithArityCheck): (JSC::ExecutableBase::generatedJITCodeWithArityCheckFor): (JSC::ExecutableBase::hasJITCodeForCall): (JSC::ExecutableBase::hasJITCodeForConstruct): (JSC::ExecutableBase::hasJITCodeFor):
  • runtime/JSFunction.h: (JSC::JSFunction::scopeUnchecked):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r90414 r90437  
    103103        }
    104104
     105        MacroAssemblerCodePtr generatedJITCodeForCallWithArityCheck()
     106        {
     107            ASSERT(m_jitCodeForCall);
     108            ASSERT(m_jitCodeForCallWithArityCheck);
     109            return m_jitCodeForCallWithArityCheck;
     110        }
     111
     112        MacroAssemblerCodePtr generatedJITCodeForConstructWithArityCheck()
     113        {
     114            ASSERT(m_jitCodeForConstruct);
     115            ASSERT(m_jitCodeForConstructWithArityCheck);
     116            return m_jitCodeForConstructWithArityCheck;
     117        }
     118       
     119        MacroAssemblerCodePtr generatedJITCodeWithArityCheckFor(CodeSpecializationKind kind)
     120        {
     121            if (kind == CodeForCall)
     122                return generatedJITCodeForCallWithArityCheck();
     123            ASSERT(kind == CodeForConstruct);
     124            return generatedJITCodeForConstructWithArityCheck();
     125        }
     126       
     127        bool hasJITCodeForCall() const
     128        {
     129            return m_numParametersForCall >= 0;
     130        }
     131       
     132        bool hasJITCodeForConstruct() const
     133        {
     134            return m_numParametersForConstruct >= 0;
     135        }
     136       
     137        bool hasJITCodeFor(CodeSpecializationKind kind) const
     138        {
     139            if (kind == CodeForCall)
     140                return hasJITCodeForCall();
     141            ASSERT(kind == CodeForConstruct);
     142            return hasJITCodeForConstruct();
     143        }
     144
    105145        void clearExecutableCode()
    106146        {
     
    456496        Identifier m_name;
    457497        SharedSymbolTable* m_symbolTable;
    458 
    459 #if ENABLE(JIT)
    460     public:
    461         MacroAssemblerCodePtr generatedJITCodeForCallWithArityCheck()
    462         {
    463             ASSERT(m_jitCodeForCall);
    464             ASSERT(m_jitCodeForCallWithArityCheck);
    465             return m_jitCodeForCallWithArityCheck;
    466         }
    467 
    468         MacroAssemblerCodePtr generatedJITCodeForConstructWithArityCheck()
    469         {
    470             ASSERT(m_jitCodeForConstruct);
    471             ASSERT(m_jitCodeForConstructWithArityCheck);
    472             return m_jitCodeForConstructWithArityCheck;
    473         }
    474        
    475         MacroAssemblerCodePtr generatedJITCodeWithArityCheckFor(CodeSpecializationKind kind)
    476         {
    477             if (kind == CodeForCall)
    478                 return generatedJITCodeForCallWithArityCheck();
    479             ASSERT(kind == CodeForConstruct);
    480             return generatedJITCodeForConstructWithArityCheck();
    481         }
    482 #endif
    483498    };
    484499
Note: See TracChangeset for help on using the changeset viewer.