Changeset 36055 in webkit for trunk/JavaScriptCore/VM/Machine.cpp


Ignore:
Timestamp:
Sep 3, 2008, 9:20:43 AM (17 years ago)
Author:
[email protected]
Message:

2008-09-03 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.


Use isUndefinedOrNull() instead of separate checks for each in op_eq_null
and op_neq_null.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Machine.cpp

    r36039 r36055  
    14371437        JSValue* src = r[(++vPC)->u.operand].jsValue(exec);
    14381438
    1439         if (src->isNull()) {
    1440             r[dst] = jsBoolean(true);
    1441             ++vPC;
    1442             NEXT_OPCODE;
    1443         }
    1444        
    1445         if (src->isUndefined()) {
     1439        if (src->isUndefinedOrNull()) {
    14461440            r[dst] = jsBoolean(true);
    14471441            ++vPC;
     
    14831477        JSValue* src = r[(++vPC)->u.operand].jsValue(exec);
    14841478
    1485         if (src->isNull()) {
    1486             r[dst] = jsBoolean(false);
    1487             ++vPC;
    1488             NEXT_OPCODE;
    1489         }
    1490        
    1491         if (src->isUndefined()) {
     1479        if (src->isUndefinedOrNull()) {
    14921480            r[dst] = jsBoolean(false);
    14931481            ++vPC;
Note: See TracChangeset for help on using the changeset viewer.