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/UnlinkedCodeBlock.h

    r154498 r155420  
    3939#include "SpecialPointer.h"
    4040#include "SymbolTable.h"
     41#include "VirtualRegister.h"
    4142
    4243#include <wtf/Compression.h>
     
    258259
    259260    void setArgumentsRegister(int argumentsRegister) { m_argumentsRegister = argumentsRegister; }
    260     bool usesArguments() const { return m_argumentsRegister != -1; }
     261    bool usesArguments() const { return m_argumentsRegister != (int)InvalidVirtualRegister; }
    261262    int argumentsRegister() const { return m_argumentsRegister; }
    262263
    263264
    264     bool usesGlobalObject() const { return m_globalObjectRegister != -1; }
     265    bool usesGlobalObject() const { return m_globalObjectRegister != (int)InvalidVirtualRegister; }
    265266    void setGlobalObjectRegister(int globalObjectRegister) { m_globalObjectRegister = globalObjectRegister; }
    266267    int globalObjectRegister() const { return m_globalObjectRegister; }
Note: See TracChangeset for help on using the changeset viewer.