diff options
author | 2015-02-19 14:01:59 +0000 | |
---|---|---|
committer | 2015-02-19 14:01:59 +0000 | |
commit | 39109a06015c91188232e59fa9e60e0915d24cd7 (patch) | |
tree | a8ffd5fd966512fd280bc1b3214f4e57a9e1805f /compiler/optimizing/nodes.cc | |
parent | 92095533ac28879ddd8b44b559d700527ca12b8a (diff) | |
parent | d6138ef1ea13d07ae555542f8898b30d89e9ac9a (diff) |
Merge "Ensure the graph is correctly typed."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index cd36598171..4a574b0754 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -292,6 +292,15 @@ bool HGraph::AnalyzeNaturalLoops() const { return true; } +HNullConstant* HGraph::GetNullConstant() { + if (cached_null_constant_ == nullptr) { + cached_null_constant_ = new (arena_) HNullConstant(); + entry_block_->InsertInstructionBefore(cached_null_constant_, + entry_block_->GetLastInstruction()); + } + return cached_null_constant_; +} + void HLoopInformation::Add(HBasicBlock* block) { blocks_.SetBit(block->GetBlockId()); } |