Ignore:
Timestamp:
Jan 29, 2016, 6:05:17 PM (9 years ago)
Author:
[email protected]
Message:

Pack FunctionExecutable and UnlinkedFunctionExecutable harder
https://bugs.webkit.org/show_bug.cgi?id=153687

Reviewed by Andreas Kling.

This patch reduces FunctionExecutable from 120 to 104 bytes.
This patch reduces UnlinkedFunctionExecutable from 144 to 136 bytes.

  • bytecode/ExecutableInfo.h:
  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

  • bytecode/UnlinkedFunctionExecutable.h:
  • parser/ParserModes.h:

(JSC::functionNameScopeIsDynamic):

  • runtime/Executable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):

  • runtime/Executable.h:

(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::isArrowFunctionContext):
(JSC::ScriptExecutable::isStrictMode):
(JSC::ScriptExecutable::derivedContextType):
(JSC::ScriptExecutable::ecmaMode):
(JSC::ScriptExecutable::finishCreation):

File:
1 edited

Legend:

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

    r195862 r195876  
    351351    bool isArrowFunctionContext() const { return m_isArrowFunctionContext; }
    352352    bool isStrictMode() const { return m_features & StrictModeFeature; }
    353     DerivedContextType derivedContextType() const { return m_derivedContextType; }
     353    DerivedContextType derivedContextType() const { return static_cast<DerivedContextType>(m_derivedContextType); }
    354354
    355355    ECMAMode ecmaMode() const { return isStrictMode() ? StrictMode : NotStrictMode; }
     
    414414    }
    415415
    416     SourceCode m_source;
    417416    CodeFeatures m_features;
    418     bool m_hasCapturedVariables;
    419     bool m_neverInline;
    420     bool m_neverOptimize { false };
    421417    bool m_didTryToEnterInLoop;
    422     DerivedContextType m_derivedContextType;
    423     bool m_isArrowFunctionContext;
     418    bool m_hasCapturedVariables : 1;
     419    bool m_neverInline : 1;
     420    bool m_neverOptimize : 1;
     421    bool m_isArrowFunctionContext : 1;
     422    unsigned m_derivedContextType : 2; // DerivedContextType
     423
    424424    int m_overrideLineNumber;
    425425    int m_firstLine;
     
    429429    unsigned m_typeProfilingStartOffset;
    430430    unsigned m_typeProfilingEndOffset;
     431    SourceCode m_source;
    431432};
    432433
     
    700701    friend class ScriptExecutable;
    701702   
     703    unsigned m_parametersStartOffset;
    702704    WriteBarrier<UnlinkedFunctionExecutable> m_unlinkedExecutable;
    703705    WriteBarrier<FunctionCodeBlock> m_codeBlockForCall;
    704706    WriteBarrier<FunctionCodeBlock> m_codeBlockForConstruct;
    705707    RefPtr<TypeSet> m_returnStatementTypeSet;
    706     unsigned m_parametersStartOffset;
    707708    WriteBarrier<InferredValue> m_singletonFunction;
    708709};
Note: See TracChangeset for help on using the changeset viewer.