⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 196999 in webkit


Ignore:
Timestamp:
Feb 23, 2016, 2:41:26 PM (11 years ago)
Author:
sbarati@apple.com
Message:

Make JSObject::getMethod have fewer branches
​https://bugs.webkit.org/show_bug.cgi?id=154603

Reviewed by Mark Lam.

Writing code with fewer branches is almost always better.

  • runtime/JSObject.cpp:

(JSC::JSObject::getMethod):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r196996 r196999  
     12016-02-23  Saam barati  <sbarati@apple.com>
     2
     3        Make JSObject::getMethod have fewer branches
     4        https://bugs.webkit.org/show_bug.cgi?id=154603
     5
     6        Reviewed by Mark Lam.
     7
     8        Writing code with fewer branches is almost always better.
     9
     10        * runtime/JSObject.cpp:
     11        (JSC::JSObject::getMethod):
     12
    1132016-02-23  Filip Pizlo  <fpizlo@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r196775 r196999  
    29482948        return jsUndefined();
    29492949
    2950     if (method.isUndefined() || method.isNull())
    2951         return jsUndefined();
    2952 
    29532950    if (!method.isCell()) {
     2951        if (method.isUndefinedOrNull())
     2952            return jsUndefined();
     2953
    29542954        throwVMTypeError(exec, errorMessage);
    29552955        return jsUndefined();
Note: See TracChangeset for help on using the changeset viewer.