Changeset 183753 in webkit


Ignore:
Timestamp:
May 4, 2015 11:45:40 AM (9 years ago)
Author:
akling@apple.com
Message:

Make ExecState::vm() branchless in release builds.
<https://webkit.org/b/144586>

Reviewed by Geoffrey Garen.

Avoid null checking the ExecState's callee() before getting the
VM from it. The code was already dereferencing it anyway, since we
know it's not gonna be null.

  • runtime/JSCellInlines.h:

(JSC::ExecState::vm):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r183752 r183753  
     12015-05-04  Andreas Kling  <akling@apple.com>
     2
     3        Make ExecState::vm() branchless in release builds.
     4        <https://webkit.org/b/144586>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Avoid null checking the ExecState's callee() before getting the
     9        VM from it. The code was already dereferencing it anyway, since we
     10        know it's not gonna be null.
     11
     12        * runtime/JSCellInlines.h:
     13        (JSC::ExecState::vm):
     14
    1152015-05-04  Basile Clement  <basile_clement@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/JSCellInlines.h

    r182747 r183753  
    121121inline VM& ExecState::vm() const
    122122{
     123    ASSERT(callee());
    123124    ASSERT(callee()->vm());
    124     return *callee()->vm();
     125    return *calleeAsValue().asCell()->vm();
    125126}
    126127
Note: See TracChangeset for help on using the changeset viewer.