diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h')
-rw-r--r-- | Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h b/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h index bd7d3ae9b..736ba8540 100644 --- a/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h +++ b/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. + * Copyright (C) 2013 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,13 +36,11 @@ namespace JSC { class CodeBlock; -class BytecodeBasicBlock { - WTF_MAKE_FAST_ALLOCATED; +class BytecodeBasicBlock : public RefCounted<BytecodeBasicBlock> { public: enum SpecialBlockType { EntryBlock, ExitBlock }; BytecodeBasicBlock(unsigned start, unsigned length); BytecodeBasicBlock(SpecialBlockType); - void shrinkToFit(); bool isEntryBlock() { return !m_leaderBytecodeOffset && !m_totalBytecodeLength; } bool isExitBlock() { return m_leaderBytecodeOffset == UINT_MAX && m_totalBytecodeLength == UINT_MAX; } @@ -53,9 +51,12 @@ public: Vector<unsigned>& bytecodeOffsets() { return m_bytecodeOffsets; } void addBytecodeLength(unsigned); - Vector<BytecodeBasicBlock*>& successors() { return m_successors; } + void addPredecessor(BytecodeBasicBlock* block) { m_predecessors.append(block); } void addSuccessor(BytecodeBasicBlock* block) { m_successors.append(block); } + Vector<BytecodeBasicBlock*>& predecessors() { return m_predecessors; } + Vector<BytecodeBasicBlock*>& successors() { return m_successors; } + FastBitVector& in() { return m_in; } FastBitVector& out() { return m_out; } @@ -64,13 +65,15 @@ private: unsigned m_totalBytecodeLength; Vector<unsigned> m_bytecodeOffsets; + + Vector<BytecodeBasicBlock*> m_predecessors; Vector<BytecodeBasicBlock*> m_successors; FastBitVector m_in; FastBitVector m_out; }; -void computeBytecodeBasicBlocks(CodeBlock*, Vector<std::unique_ptr<BytecodeBasicBlock>>&); +void computeBytecodeBasicBlocks(CodeBlock*, Vector<RefPtr<BytecodeBasicBlock> >&); inline BytecodeBasicBlock::BytecodeBasicBlock(unsigned start, unsigned length) : m_leaderBytecodeOffset(start) |