Ignore:
Timestamp:
Jan 29, 2016, 6:05:17 PM (10 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/bytecode/UnlinkedFunctionExecutable.cpp

    r195862 r195876  
    8181UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables, DerivedContextType derivedContextType)
    8282    : Base(*vm, structure)
    83     , m_name(node->ident())
    84     , m_inferredName(node->inferredName())
    85     , m_sourceOverride(WTFMove(sourceOverride))
    8683    , m_firstLineOffset(node->firstLine() - source.firstLine())
    8784    , m_lineCount(node->lastLine() - node->firstLine())
     
    9592    , m_typeProfilingEndOffset(node->startStartOffset() + node->source().length() - 1)
    9693    , m_parameterCount(node->parameterCount())
    97     , m_parseMode(node->parseMode())
    9894    , m_features(0)
    9995    , m_isInStrictContext(node->isInStrictContext())
     
    105101    , m_superBinding(static_cast<unsigned>(node->superBinding()))
    106102    , m_derivedContextType(static_cast<unsigned>(derivedContextType))
     103    , m_sourceParseMode(static_cast<unsigned>(node->parseMode()))
     104    , m_name(node->ident())
     105    , m_inferredName(node->inferredName())
     106    , m_sourceOverride(WTFMove(sourceOverride))
    107107{
    108108    ASSERT(m_constructorKind == static_cast<unsigned>(node->constructorKind()));
Note: See TracChangeset for help on using the changeset viewer.