X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..refs/heads/master:/bytecode/FullBytecodeLiveness.h diff --git a/bytecode/FullBytecodeLiveness.h b/bytecode/FullBytecodeLiveness.h index d343921..864af75 100644 --- a/bytecode/FullBytecodeLiveness.h +++ b/bytecode/FullBytecodeLiveness.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -36,32 +36,20 @@ typedef HashMap, WTF::UnsignedWi class FullBytecodeLiveness { public: - FullBytecodeLiveness() : m_codeBlock(0) { } - - // We say "out" to refer to the bitvector that contains raw results for a bytecode - // instruction. - const FastBitVector& getOut(unsigned bytecodeIndex) const + const FastBitVector& getLiveness(unsigned bytecodeIndex) const { - BytecodeToBitmapMap::const_iterator iter = m_map.find(bytecodeIndex); - ASSERT(iter != m_map.end()); - return iter->value; + return m_map[bytecodeIndex]; } bool operandIsLive(int operand, unsigned bytecodeIndex) const { - return operandIsAlwaysLive(m_codeBlock, operand) || operandThatIsNotAlwaysLiveIsLive(m_codeBlock, getOut(bytecodeIndex), operand); - } - - FastBitVector getLiveness(unsigned bytecodeIndex) const - { - return getLivenessInfo(m_codeBlock, getOut(bytecodeIndex)); + return operandIsAlwaysLive(operand) || operandThatIsNotAlwaysLiveIsLive(getLiveness(bytecodeIndex), operand); } private: friend class BytecodeLivenessAnalysis; - CodeBlock* m_codeBlock; - BytecodeToBitmapMap m_map; + Vector m_map; }; } // namespace JSC