Ignore:
Timestamp:
Jun 16, 2008, 7:49:07 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-16 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.


Slight cleanup to the SymbolTableEntry class.


Renamed isEmpty to isNull, since we usually use "empty" to mean "holds
the valid, empty value", and "null" to mean "holds no value".


Changed an "== 0" to a "!", to match our style guidelines.


Added some ASSERTs to verify the (possibly questionable) assumption that
all register indexes will have their high two bits set. Also clarified a
comment to make that assumption clear.

File:
1 edited

Legend:

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

    r34607 r34610  
    327327
    328328    SymbolTableEntry entry = symbolTable().get(ident.ustring().rep());
    329     if (entry.isEmpty())
     329    if (entry.isNull())
    330330        return 0;
    331331
     
    339339
    340340    SymbolTableEntry entry = symbolTable().get(ident.ustring().rep());
    341     ASSERT(!entry.isEmpty());
     341    ASSERT(!entry.isNull());
    342342
    343343    return &m_locals[localsIndex(entry.getIndex())];
     
    609609
    610610        // Found the property
    611         if (!entry.isEmpty()) {
     611        if (!entry.isNull()) {
    612612            stackDepth = depth;
    613613            index = entry.getIndex();
Note: See TracChangeset for help on using the changeset viewer.