Ignore:
Timestamp:
Jan 19, 2015, 9:01:26 PM (10 years ago)
Author:
[email protected]
Message:

ClosureCallStubRoutine no longer needs codeOrigin
https://bugs.webkit.org/show_bug.cgi?id=140659

Reviewed by Michael Saboff.

Once upon a time, we would look for the CodeOrigin associated with a return PC. This search
would start with the CodeBlock according to the caller frame's call frame header. But if the
call was a closure call, the return PC would be inside some closure call stub. So if the
CodeBlock search failed, we would search *all* closure call stub routines to see which one
encompasses the return PC. Then, we would use the CodeOrigin stored in the stub routine
object. This was all a bunch of madness, and we actually got rid of it - we now determine
the CodeOrigin for a call frame using the encoded code origin bits inside the tag of the
argument count.

This patch removes the final vestiges of the madness:

  • Remove the totally unused method declaration for the thing that did the closure call stub search.


  • Remove the CodeOrigin field from the ClosureCallStubRoutine. Except for that crazy search that we no longer do, everyone else who finds a ClosureCallStubRoutine will find it via the CallLinkInfo. The CallLinkInfo also has the CodeOrigin, so we don't need this field anymore.
  • bytecode/CodeBlock.h:
  • jit/ClosureCallStubRoutine.cpp:

(JSC::ClosureCallStubRoutine::ClosureCallStubRoutine):

  • jit/ClosureCallStubRoutine.h:

(JSC::ClosureCallStubRoutine::executable):
(JSC::ClosureCallStubRoutine::codeOrigin): Deleted.

  • jit/Repatch.cpp:

(JSC::linkClosureCall):

File:
1 edited

Legend:

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

    r172176 r178693  
    11/*
    2  * Copyright (C) 2012, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2014, 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3838    ClosureCallStubRoutine(
    3939        const MacroAssemblerCodeRef&, VM&, const JSCell* owner,
    40         ExecutableBase*, const CodeOrigin&);
     40        ExecutableBase*);
    4141   
    4242    virtual ~ClosureCallStubRoutine();
    4343   
    4444    ExecutableBase* executable() const { return m_executable.get(); }
    45     const CodeOrigin& codeOrigin() const { return m_codeOrigin; }
    4645
    4746protected:
     
    5049private:
    5150    WriteBarrier<ExecutableBase> m_executable;
    52     // This allows us to figure out who a call is linked to by searching through
    53     // stub routines.
    54     CodeOrigin m_codeOrigin;
    5551};
    5652
Note: See TracChangeset for help on using the changeset viewer.