Changeset 167813 in webkit


Ignore:
Timestamp:
Apr 25, 2014 11:51:20 AM (10 years ago)
Author:
oliver@apple.com
Message:

Remove unused parameter from codeblock linking function
https://bugs.webkit.org/show_bug.cgi?id=132199

Reviewed by Anders Carlsson.

No change in behaviour. This is just a small change to make it
slightly easier to reason about what the offsets in UnlinkedFunctionExecutable
actually mean.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedFunctionExecutable::link):

  • bytecode/UnlinkedCodeBlock.h:
  • runtime/Executable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r167811 r167813  
     12014-04-25  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove unused parameter from codeblock linking function
     4        https://bugs.webkit.org/show_bug.cgi?id=132199
     5
     6        Reviewed by Anders Carlsson.
     7
     8        No change in behaviour. This is just a small change to make it
     9        slightly easier to reason about what the offsets in UnlinkedFunctionExecutable
     10        actually mean.
     11
     12        * bytecode/UnlinkedCodeBlock.cpp:
     13        (JSC::UnlinkedFunctionExecutable::link):
     14        * bytecode/UnlinkedCodeBlock.h:
     15        * runtime/Executable.cpp:
     16        (JSC::ProgramExecutable::initializeGlobalProperties):
     17
    1182014-04-25  Andreas Kling  <akling@apple.com>
    219
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r167313 r167813  
    125125}
    126126
    127 FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& source, size_t lineOffset, size_t sourceOffset)
     127FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& source, size_t lineOffset)
    128128{
    129129    unsigned firstLine = lineOffset + m_firstLineOffset;
    130     unsigned startOffset = sourceOffset + m_startOffset;
    131130    bool startColumnIsOnFirstSourceLine = !m_firstLineOffset;
    132131    unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1);
    133132    bool endColumnIsOnStartLine = !m_lineCount;
    134133    unsigned endColumn = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? startColumn : 1);
    135     SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn);
     134    SourceCode code(source.provider(), m_startOffset, m_startOffset + m_sourceLength, firstLine, startColumn);
    136135    return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumn);
    137136}
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h

    r164764 r167813  
    133133    static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
    134134
    135     FunctionExecutable* link(VM&, const SourceCode&, size_t lineOffset, size_t sourceOffset);
     135    FunctionExecutable* link(VM&, const SourceCode&, size_t lineOffset);
    136136
    137137    void clearCodeForRecompilation()
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r167313 r167813  
    486486    for (size_t i = 0; i < functionDeclarations.size(); ++i) {
    487487        UnlinkedFunctionExecutable* unlinkedFunctionExecutable = functionDeclarations[i].second.get();
    488         JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source, lineNo(), 0), scope);
     488        JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source, lineNo()), scope);
    489489        globalObject->addFunction(callFrame, functionDeclarations[i].first, value);
    490490    }
Note: See TracChangeset for help on using the changeset viewer.