Ignore:
Timestamp:
Sep 9, 2013, 11:09:40 PM (12 years ago)
Author:
[email protected]
Message:

There should be one "invalid" virtual register constant
https://bugs.webkit.org/show_bug.cgi?id=121057

Reviewed by Filip Pizlo.

Unify all references to an invalid virtual register to be the enum InvalidVirtualRegister.
Changed the value of InvalidVirtualRegister to be maximum integer value.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::setArgumentsRegister):
(JSC::CodeBlock::usesArguments):

  • bytecode/LazyOperandValueProfile.h:

(JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
(JSC::LazyOperandValueProfileKey::operator!):
(JSC::LazyOperandValueProfileKey::isHashTableDeletedValue):
(JSC::LazyOperandValueProfile::LazyOperandValueProfile):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::usesArguments):
(JSC::UnlinkedCodeBlock::usesGlobalObject):

  • bytecode/VirtualRegister.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r155415 r155420  
    325325    void setArgumentsRegister(int argumentsRegister)
    326326    {
    327         ASSERT(argumentsRegister != -1);
     327        ASSERT(argumentsRegister != (int)InvalidVirtualRegister);
    328328        m_argumentsRegister = argumentsRegister;
    329329        ASSERT(usesArguments());
     
    355355        return activationRegister();
    356356    }
    357     bool usesArguments() const { return m_argumentsRegister != -1; }
     357    bool usesArguments() const { return m_argumentsRegister != (int)InvalidVirtualRegister; }
    358358
    359359    bool needsActivation() const
Note: See TracChangeset for help on using the changeset viewer.