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.cpp

    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
     
    4040ClosureCallStubRoutine::ClosureCallStubRoutine(
    4141    const MacroAssemblerCodeRef& code, VM& vm, const JSCell* owner,
    42     ExecutableBase* executable, const CodeOrigin& codeOrigin)
     42    ExecutableBase* executable)
    4343    : GCAwareJITStubRoutine(code, vm)
    4444    , m_executable(vm, owner, executable)
    45     , m_codeOrigin(codeOrigin)
    4645{
    4746}
Note: See TracChangeset for help on using the changeset viewer.