Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "reference_type_propagation.h" |
| 18 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 19 | #include "class_linker.h" |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 20 | #include "class_linker-inl.h" |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 21 | #include "mirror/class-inl.h" |
| 22 | #include "mirror/dex_cache.h" |
| 23 | #include "scoped_thread_state_change.h" |
| 24 | |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 25 | namespace art { |
| 26 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 27 | class RTPVisitor : public HGraphDelegateVisitor { |
| 28 | public: |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 29 | RTPVisitor(HGraph* graph, |
| 30 | StackHandleScopeCollection* handles, |
| 31 | GrowableArray<HInstruction*>* worklist, |
| 32 | ReferenceTypeInfo::TypeHandle object_class_handle, |
| 33 | ReferenceTypeInfo::TypeHandle class_class_handle, |
| 34 | ReferenceTypeInfo::TypeHandle string_class_handle) |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 35 | : HGraphDelegateVisitor(graph), |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 36 | handles_(handles), |
| 37 | object_class_handle_(object_class_handle), |
| 38 | class_class_handle_(class_class_handle), |
| 39 | string_class_handle_(string_class_handle), |
| 40 | worklist_(worklist) {} |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 41 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 42 | void VisitNullConstant(HNullConstant* null_constant) OVERRIDE; |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 43 | void VisitNewInstance(HNewInstance* new_instance) OVERRIDE; |
| 44 | void VisitLoadClass(HLoadClass* load_class) OVERRIDE; |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 45 | void VisitClinitCheck(HClinitCheck* clinit_check) OVERRIDE; |
| 46 | void VisitLoadString(HLoadString* instr) OVERRIDE; |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 47 | void VisitNewArray(HNewArray* instr) OVERRIDE; |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 48 | void VisitParameterValue(HParameterValue* instr) OVERRIDE; |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 49 | void UpdateFieldAccessTypeInfo(HInstruction* instr, const FieldInfo& info); |
| 50 | void SetClassAsTypeInfo(HInstruction* instr, mirror::Class* klass, bool is_exact); |
| 51 | void VisitInstanceFieldGet(HInstanceFieldGet* instr) OVERRIDE; |
| 52 | void VisitStaticFieldGet(HStaticFieldGet* instr) OVERRIDE; |
| 53 | void VisitInvoke(HInvoke* instr) OVERRIDE; |
Guillaume "Vermeille" Sanchez | 72a5eb5 | 2015-06-02 17:39:45 +0100 | [diff] [blame] | 54 | void VisitArrayGet(HArrayGet* instr) OVERRIDE; |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 55 | void VisitNullCheck(HNullCheck* instr) OVERRIDE; |
| 56 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 57 | void UpdateReferenceTypeInfo(HInstruction* instr, |
| 58 | uint16_t type_idx, |
| 59 | const DexFile& dex_file, |
| 60 | bool is_exact); |
| 61 | |
| 62 | private: |
| 63 | StackHandleScopeCollection* handles_; |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 64 | ReferenceTypeInfo::TypeHandle object_class_handle_; |
| 65 | ReferenceTypeInfo::TypeHandle class_class_handle_; |
| 66 | ReferenceTypeInfo::TypeHandle string_class_handle_; |
| 67 | GrowableArray<HInstruction*>* worklist_; |
| 68 | |
| 69 | static constexpr size_t kDefaultWorklistSize = 8; |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 70 | }; |
| 71 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 72 | ReferenceTypePropagation::ReferenceTypePropagation(HGraph* graph, |
| 73 | StackHandleScopeCollection* handles) |
| 74 | : HOptimization(graph, kReferenceTypePropagationPassName), |
| 75 | handles_(handles), |
| 76 | worklist_(graph->GetArena(), kDefaultWorklistSize) { |
| 77 | ClassLinker* linker = Runtime::Current()->GetClassLinker(); |
| 78 | object_class_handle_ = handles_->NewHandle(linker->GetClassRoot(ClassLinker::kJavaLangObject)); |
| 79 | string_class_handle_ = handles_->NewHandle(linker->GetClassRoot(ClassLinker::kJavaLangString)); |
| 80 | class_class_handle_ = handles_->NewHandle(linker->GetClassRoot(ClassLinker::kJavaLangClass)); |
| 81 | |
| 82 | if (kIsDebugBuild) { |
| 83 | ScopedObjectAccess soa(Thread::Current()); |
| 84 | DCHECK(ReferenceTypeInfo::IsValidHandle(object_class_handle_)); |
| 85 | DCHECK(ReferenceTypeInfo::IsValidHandle(class_class_handle_)); |
| 86 | DCHECK(ReferenceTypeInfo::IsValidHandle(string_class_handle_)); |
| 87 | } |
| 88 | } |
| 89 | |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 90 | void ReferenceTypePropagation::Run() { |
| 91 | // To properly propagate type info we need to visit in the dominator-based order. |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 92 | // Reverse post order guarantees a node's dominators are visited first. |
| 93 | // We take advantage of this order in `VisitBasicBlock`. |
Calin Juravle | 6c0c4f2 | 2015-06-12 15:40:42 +0000 | [diff] [blame] | 94 | for (HReversePostOrderIterator it(*graph_); !it.Done(); it.Advance()) { |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 95 | VisitBasicBlock(it.Current()); |
| 96 | } |
| 97 | ProcessWorklist(); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 98 | |
| 99 | if (kIsDebugBuild) { |
| 100 | // TODO: move this to the graph checker. |
| 101 | ScopedObjectAccess soa(Thread::Current()); |
| 102 | for (HReversePostOrderIterator it(*graph_); !it.Done(); it.Advance()) { |
| 103 | HBasicBlock* block = it.Current(); |
| 104 | for (HInstructionIterator iti(block->GetInstructions()); !iti.Done(); iti.Advance()) { |
| 105 | HInstruction* instr = iti.Current(); |
| 106 | if (instr->GetType() == Primitive::kPrimNot) { |
| 107 | DCHECK(instr->GetReferenceTypeInfo().IsValid()) |
| 108 | << "Invalid RTI for instruction: " << instr->DebugName(); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | } |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 113 | } |
| 114 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 115 | void ReferenceTypePropagation::VisitBasicBlock(HBasicBlock* block) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 116 | RTPVisitor visitor(graph_, |
| 117 | handles_, |
| 118 | &worklist_, |
| 119 | object_class_handle_, |
| 120 | class_class_handle_, |
| 121 | string_class_handle_); |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 122 | // Initialize exact types first for faster convergence. |
| 123 | for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { |
| 124 | HInstruction* instr = it.Current(); |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 125 | instr->Accept(&visitor); |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | // Handle Phis. |
| 129 | for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { |
| 130 | VisitPhi(it.Current()->AsPhi()); |
| 131 | } |
| 132 | |
| 133 | // Add extra nodes to bound types. |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 134 | BoundTypeForIfNotNull(block); |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 135 | BoundTypeForIfInstanceOf(block); |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 136 | } |
| 137 | |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 138 | void ReferenceTypePropagation::BoundTypeForIfNotNull(HBasicBlock* block) { |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 139 | HIf* ifInstruction = block->GetLastInstruction()->AsIf(); |
| 140 | if (ifInstruction == nullptr) { |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 141 | return; |
| 142 | } |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 143 | HInstruction* ifInput = ifInstruction->InputAt(0); |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 144 | if (!ifInput->IsNotEqual() && !ifInput->IsEqual()) { |
| 145 | return; |
| 146 | } |
| 147 | HInstruction* input0 = ifInput->InputAt(0); |
| 148 | HInstruction* input1 = ifInput->InputAt(1); |
Calin Juravle | edad8ad | 2015-04-23 14:34:33 +0100 | [diff] [blame] | 149 | HInstruction* obj = nullptr; |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 150 | |
Calin Juravle | edad8ad | 2015-04-23 14:34:33 +0100 | [diff] [blame] | 151 | if (input1->IsNullConstant()) { |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 152 | obj = input0; |
Calin Juravle | edad8ad | 2015-04-23 14:34:33 +0100 | [diff] [blame] | 153 | } else if (input0->IsNullConstant()) { |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 154 | obj = input1; |
| 155 | } else { |
| 156 | return; |
| 157 | } |
| 158 | |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 159 | // We only need to bound the type if we have uses in the relevant block. |
| 160 | // So start with null and create the HBoundType lazily, only if it's needed. |
| 161 | HBoundType* bound_type = nullptr; |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 162 | HBasicBlock* notNullBlock = ifInput->IsNotEqual() |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 163 | ? ifInstruction->IfTrueSuccessor() |
| 164 | : ifInstruction->IfFalseSuccessor(); |
| 165 | |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 166 | for (HUseIterator<HInstruction*> it(obj->GetUses()); !it.Done(); it.Advance()) { |
| 167 | HInstruction* user = it.Current()->GetUser(); |
| 168 | if (notNullBlock->Dominates(user->GetBlock())) { |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 169 | if (bound_type == nullptr) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 170 | bound_type = new (graph_->GetArena()) HBoundType(obj, obj->GetReferenceTypeInfo()); |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 171 | notNullBlock->InsertInstructionBefore(bound_type, notNullBlock->GetFirstInstruction()); |
| 172 | } |
Calin Juravle | 61d544b | 2015-02-23 16:46:57 +0000 | [diff] [blame] | 173 | user->ReplaceInput(bound_type, it.Current()->GetIndex()); |
| 174 | } |
| 175 | } |
| 176 | } |
| 177 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 178 | // Detects if `block` is the True block for the pattern |
| 179 | // `if (x instanceof ClassX) { }` |
| 180 | // If that's the case insert an HBoundType instruction to bound the type of `x` |
| 181 | // to `ClassX` in the scope of the dominated blocks. |
| 182 | void ReferenceTypePropagation::BoundTypeForIfInstanceOf(HBasicBlock* block) { |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 183 | HIf* ifInstruction = block->GetLastInstruction()->AsIf(); |
| 184 | if (ifInstruction == nullptr) { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 185 | return; |
| 186 | } |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 187 | HInstruction* ifInput = ifInstruction->InputAt(0); |
| 188 | HInstruction* instanceOf = nullptr; |
| 189 | HBasicBlock* instanceOfTrueBlock = nullptr; |
David Brazdil | 0d13fee | 2015-04-17 14:52:19 +0100 | [diff] [blame] | 190 | |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 191 | // The instruction simplifier has transformed: |
| 192 | // - `if (a instanceof A)` into an HIf with an HInstanceOf input |
| 193 | // - `if (!(a instanceof A)` into an HIf with an HBooleanNot input (which in turn |
| 194 | // has an HInstanceOf input) |
| 195 | // So we should not see the usual HEqual here. |
David Brazdil | 0d13fee | 2015-04-17 14:52:19 +0100 | [diff] [blame] | 196 | if (ifInput->IsInstanceOf()) { |
| 197 | instanceOf = ifInput; |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 198 | instanceOfTrueBlock = ifInstruction->IfTrueSuccessor(); |
David Brazdil | 0d13fee | 2015-04-17 14:52:19 +0100 | [diff] [blame] | 199 | } else if (ifInput->IsBooleanNot() && ifInput->InputAt(0)->IsInstanceOf()) { |
| 200 | instanceOf = ifInput->InputAt(0); |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 201 | instanceOfTrueBlock = ifInstruction->IfFalseSuccessor(); |
David Brazdil | 0d13fee | 2015-04-17 14:52:19 +0100 | [diff] [blame] | 202 | } else { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 203 | return; |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 204 | } |
| 205 | |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 206 | // We only need to bound the type if we have uses in the relevant block. |
| 207 | // So start with null and create the HBoundType lazily, only if it's needed. |
| 208 | HBoundType* bound_type = nullptr; |
| 209 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 210 | HInstruction* obj = instanceOf->InputAt(0); |
Nicolas Geoffray | f9a1995 | 2015-06-29 13:43:54 +0100 | [diff] [blame] | 211 | if (obj->GetReferenceTypeInfo().IsExact() && !obj->IsPhi()) { |
| 212 | // This method is being called while doing a fixed-point calculation |
| 213 | // over phis. Non-phis instruction whose type is already known do |
| 214 | // not need to be bound to another type. |
| 215 | // Not that this also prevents replacing `HLoadClass` with a `HBoundType`. |
| 216 | // `HCheckCast` and `HInstanceOf` expect a `HLoadClass` as a second |
| 217 | // input. |
| 218 | return; |
| 219 | } |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 220 | for (HUseIterator<HInstruction*> it(obj->GetUses()); !it.Done(); it.Advance()) { |
| 221 | HInstruction* user = it.Current()->GetUser(); |
| 222 | if (instanceOfTrueBlock->Dominates(user->GetBlock())) { |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 223 | if (bound_type == nullptr) { |
| 224 | HLoadClass* load_class = instanceOf->InputAt(1)->AsLoadClass(); |
| 225 | |
| 226 | ReferenceTypeInfo obj_rti = obj->GetReferenceTypeInfo(); |
| 227 | ReferenceTypeInfo class_rti = load_class->GetLoadedClassRTI(); |
Calin Juravle | 6c0c4f2 | 2015-06-12 15:40:42 +0000 | [diff] [blame] | 228 | bound_type = new (graph_->GetArena()) HBoundType(obj, class_rti); |
Calin Juravle | b330664 | 2015-04-20 18:30:42 +0100 | [diff] [blame] | 229 | |
| 230 | // Narrow the type as much as possible. |
| 231 | { |
| 232 | ScopedObjectAccess soa(Thread::Current()); |
| 233 | if (!load_class->IsResolved() || class_rti.IsSupertypeOf(obj_rti)) { |
| 234 | bound_type->SetReferenceTypeInfo(obj_rti); |
| 235 | } else { |
| 236 | bound_type->SetReferenceTypeInfo( |
| 237 | ReferenceTypeInfo::Create(class_rti.GetTypeHandle(), /* is_exact */ false)); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | instanceOfTrueBlock->InsertInstructionBefore( |
| 242 | bound_type, instanceOfTrueBlock->GetFirstInstruction()); |
| 243 | } |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 244 | user->ReplaceInput(bound_type, it.Current()->GetIndex()); |
| 245 | } |
| 246 | } |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 247 | } |
| 248 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 249 | void RTPVisitor::SetClassAsTypeInfo(HInstruction* instr, |
| 250 | mirror::Class* klass, |
| 251 | bool is_exact) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 252 | if (instr->IsInvokeStaticOrDirect() && instr->AsInvokeStaticOrDirect()->IsStringInit()) { |
| 253 | // Calls to String.<init> are replaced with a StringFactory. |
| 254 | if (kIsDebugBuild) { |
| 255 | ScopedObjectAccess soa(Thread::Current()); |
| 256 | ClassLinker* cl = Runtime::Current()->GetClassLinker(); |
| 257 | mirror::DexCache* dex_cache = cl->FindDexCache(instr->AsInvoke()->GetDexFile()); |
| 258 | ArtMethod* method = dex_cache->GetResolvedMethod( |
| 259 | instr->AsInvoke()->GetDexMethodIndex(), cl->GetImagePointerSize()); |
| 260 | DCHECK(method != nullptr); |
| 261 | mirror::Class* declaring_class = method->GetDeclaringClass(); |
| 262 | DCHECK(declaring_class != nullptr); |
| 263 | DCHECK(declaring_class->IsStringClass()) |
| 264 | << "Expected String class: " << PrettyDescriptor(declaring_class); |
| 265 | DCHECK(method->IsConstructor()) |
| 266 | << "Expected String.<init>: " << PrettyMethod(method); |
| 267 | } |
| 268 | instr->SetReferenceTypeInfo( |
| 269 | ReferenceTypeInfo::Create(string_class_handle_, /* is_exact */ true)); |
| 270 | } else if (klass != nullptr) { |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 271 | ScopedObjectAccess soa(Thread::Current()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 272 | ReferenceTypeInfo::TypeHandle handle = handles_->NewHandle(klass); |
Guillaume Sanchez | 222862c | 2015-06-09 18:33:02 +0100 | [diff] [blame] | 273 | is_exact = is_exact || klass->IsFinal(); |
| 274 | instr->SetReferenceTypeInfo(ReferenceTypeInfo::Create(handle, is_exact)); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 275 | } else { |
| 276 | instr->SetReferenceTypeInfo( |
| 277 | ReferenceTypeInfo::Create(object_class_handle_, /* is_exact */ false)); |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 278 | } |
| 279 | } |
| 280 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 281 | void RTPVisitor::UpdateReferenceTypeInfo(HInstruction* instr, |
| 282 | uint16_t type_idx, |
| 283 | const DexFile& dex_file, |
| 284 | bool is_exact) { |
Guillaume "Vermeille" Sanchez | 81d804a | 2015-05-20 12:42:25 +0100 | [diff] [blame] | 285 | DCHECK_EQ(instr->GetType(), Primitive::kPrimNot); |
| 286 | |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 287 | ScopedObjectAccess soa(Thread::Current()); |
Guillaume "Vermeille" Sanchez | 81d804a | 2015-05-20 12:42:25 +0100 | [diff] [blame] | 288 | mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file); |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 289 | // Get type from dex cache assuming it was populated by the verifier. |
Guillaume Sanchez | 222862c | 2015-06-09 18:33:02 +0100 | [diff] [blame] | 290 | SetClassAsTypeInfo(instr, dex_cache->GetResolvedType(type_idx), is_exact); |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 291 | } |
| 292 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 293 | void RTPVisitor::VisitNullConstant(HNullConstant* instr) { |
| 294 | instr->SetReferenceTypeInfo( |
| 295 | ReferenceTypeInfo::Create(object_class_handle_, /* is_exact */ false)); |
| 296 | } |
| 297 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 298 | void RTPVisitor::VisitNewInstance(HNewInstance* instr) { |
Guillaume Sanchez | 222862c | 2015-06-09 18:33:02 +0100 | [diff] [blame] | 299 | UpdateReferenceTypeInfo(instr, instr->GetTypeIndex(), instr->GetDexFile(), /* is_exact */ true); |
Guillaume "Vermeille" Sanchez | 81d804a | 2015-05-20 12:42:25 +0100 | [diff] [blame] | 300 | } |
| 301 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 302 | void RTPVisitor::VisitNewArray(HNewArray* instr) { |
Guillaume Sanchez | 222862c | 2015-06-09 18:33:02 +0100 | [diff] [blame] | 303 | UpdateReferenceTypeInfo(instr, instr->GetTypeIndex(), instr->GetDexFile(), /* is_exact */ true); |
Guillaume "Vermeille" Sanchez | 81d804a | 2015-05-20 12:42:25 +0100 | [diff] [blame] | 304 | } |
| 305 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 306 | void RTPVisitor::VisitParameterValue(HParameterValue* instr) { |
| 307 | if (instr->GetType() == Primitive::kPrimNot) { |
| 308 | // TODO: parse the signature and add precise types for the parameters. |
| 309 | SetClassAsTypeInfo(instr, nullptr, /* is_exact */ false); |
| 310 | } |
| 311 | } |
| 312 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 313 | void RTPVisitor::UpdateFieldAccessTypeInfo(HInstruction* instr, |
| 314 | const FieldInfo& info) { |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 315 | // The field index is unknown only during tests. |
| 316 | if (instr->GetType() != Primitive::kPrimNot || info.GetFieldIndex() == kUnknownFieldIndex) { |
| 317 | return; |
| 318 | } |
| 319 | |
| 320 | ScopedObjectAccess soa(Thread::Current()); |
| 321 | ClassLinker* cl = Runtime::Current()->GetClassLinker(); |
| 322 | mirror::DexCache* dex_cache = cl->FindDexCache(info.GetDexFile()); |
| 323 | ArtField* field = cl->GetResolvedField(info.GetFieldIndex(), dex_cache); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 324 | // TODO: There are certain cases where we can't resolve the field. |
| 325 | // b/21914925 is open to keep track of a repro case for this issue. |
| 326 | mirror::Class* klass = (field == nullptr) ? nullptr : field->GetType<false>(); |
| 327 | SetClassAsTypeInfo(instr, klass, /* is_exact */ false); |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 328 | } |
| 329 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 330 | void RTPVisitor::VisitInstanceFieldGet(HInstanceFieldGet* instr) { |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 331 | UpdateFieldAccessTypeInfo(instr, instr->GetFieldInfo()); |
| 332 | } |
| 333 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 334 | void RTPVisitor::VisitStaticFieldGet(HStaticFieldGet* instr) { |
Guillaume "Vermeille" Sanchez | 104fd8a | 2015-05-20 17:52:13 +0100 | [diff] [blame] | 335 | UpdateFieldAccessTypeInfo(instr, instr->GetFieldInfo()); |
| 336 | } |
| 337 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 338 | void RTPVisitor::VisitLoadClass(HLoadClass* instr) { |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 339 | ScopedObjectAccess soa(Thread::Current()); |
Nicolas Geoffray | d5111bf | 2015-05-22 15:37:09 +0100 | [diff] [blame] | 340 | mirror::DexCache* dex_cache = |
| 341 | Runtime::Current()->GetClassLinker()->FindDexCache(instr->GetDexFile()); |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 342 | // Get type from dex cache assuming it was populated by the verifier. |
| 343 | mirror::Class* resolved_class = dex_cache->GetResolvedType(instr->GetTypeIndex()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 344 | DCHECK(resolved_class != nullptr); |
| 345 | ReferenceTypeInfo::TypeHandle handle = handles_->NewHandle(resolved_class); |
| 346 | instr->SetLoadedClassRTI(ReferenceTypeInfo::Create(handle, /* is_exact */ true)); |
| 347 | instr->SetReferenceTypeInfo(ReferenceTypeInfo::Create(class_class_handle_, /* is_exact */ true)); |
| 348 | } |
| 349 | |
| 350 | void RTPVisitor::VisitClinitCheck(HClinitCheck* instr) { |
| 351 | instr->SetReferenceTypeInfo(instr->InputAt(0)->GetReferenceTypeInfo()); |
| 352 | } |
| 353 | |
| 354 | void RTPVisitor::VisitLoadString(HLoadString* instr) { |
| 355 | instr->SetReferenceTypeInfo(ReferenceTypeInfo::Create(string_class_handle_, /* is_exact */ true)); |
| 356 | } |
| 357 | |
| 358 | void RTPVisitor::VisitNullCheck(HNullCheck* instr) { |
| 359 | ScopedObjectAccess soa(Thread::Current()); |
| 360 | |
| 361 | HInstruction* parent = instr->InputAt(0); |
| 362 | ReferenceTypeInfo parent_rti = parent->GetReferenceTypeInfo(); |
| 363 | if (!parent_rti.IsValid()) { |
| 364 | // Parent could be a Phi or an ArrayGet and we might not have any valid |
| 365 | // information on them at this point. |
| 366 | DCHECK(parent->IsPhi() || parent->IsArrayGet()) << parent->DebugName(); |
| 367 | worklist_->Add(instr); |
| 368 | return; |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 369 | } |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 370 | instr->SetReferenceTypeInfo(parent->GetReferenceTypeInfo()); |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 371 | } |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 372 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 373 | void ReferenceTypePropagation::VisitPhi(HPhi* phi) { |
| 374 | if (phi->GetType() != Primitive::kPrimNot) { |
| 375 | return; |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 376 | } |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 377 | |
| 378 | if (phi->GetBlock()->IsLoopHeader()) { |
| 379 | // Set the initial type for the phi. Use the non back edge input for reaching |
| 380 | // a fixed point faster. |
| 381 | AddToWorklist(phi); |
| 382 | phi->SetCanBeNull(phi->InputAt(0)->CanBeNull()); |
| 383 | phi->SetReferenceTypeInfo(phi->InputAt(0)->GetReferenceTypeInfo()); |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 384 | } else { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 385 | // Eagerly compute the type of the phi, for quicker convergence. Note |
| 386 | // that we don't need to add users to the worklist because we are |
| 387 | // doing a reverse post-order visit, therefore either the phi users are |
| 388 | // non-loop phi and will be visited later in the visit, or are loop-phis, |
| 389 | // and they are already in the work list. |
| 390 | UpdateNullability(phi); |
| 391 | UpdateReferenceTypeInfo(phi); |
| 392 | } |
| 393 | } |
| 394 | |
| 395 | ReferenceTypeInfo ReferenceTypePropagation::MergeTypes(const ReferenceTypeInfo& a, |
| 396 | const ReferenceTypeInfo& b) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 397 | if (!b.IsValid()) { |
| 398 | return a; |
| 399 | } |
| 400 | if (!a.IsValid()) { |
| 401 | return b; |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 402 | } |
| 403 | |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 404 | bool is_exact = a.IsExact() && b.IsExact(); |
| 405 | Handle<mirror::Class> type_handle; |
| 406 | |
| 407 | if (a.GetTypeHandle().Get() == b.GetTypeHandle().Get()) { |
| 408 | type_handle = a.GetTypeHandle(); |
| 409 | } else if (a.IsSupertypeOf(b)) { |
| 410 | type_handle = a.GetTypeHandle(); |
| 411 | is_exact = false; |
| 412 | } else if (b.IsSupertypeOf(a)) { |
| 413 | type_handle = b.GetTypeHandle(); |
| 414 | is_exact = false; |
| 415 | } else { |
| 416 | // TODO: Find the first common super class. |
| 417 | type_handle = object_class_handle_; |
| 418 | is_exact = false; |
| 419 | } |
| 420 | |
| 421 | return ReferenceTypeInfo::Create(type_handle, is_exact); |
| 422 | } |
| 423 | |
| 424 | static void UpdateArrayGet(HArrayGet* instr, |
| 425 | StackHandleScopeCollection* handles, |
| 426 | ReferenceTypeInfo::TypeHandle object_class_handle) |
| 427 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 428 | DCHECK_EQ(Primitive::kPrimNot, instr->GetType()); |
| 429 | |
| 430 | HInstruction* array = instr->InputAt(0); |
| 431 | ReferenceTypeInfo parent_rti = array->GetReferenceTypeInfo(); |
| 432 | if (!parent_rti.IsValid()) { |
| 433 | DCHECK(array->IsPhi() || array->IsNullCheck() || array->IsArrayGet()); |
| 434 | // The array could be a Phi/NullCheck/ArrayGet for which we might have not have |
| 435 | // valid information at this point. |
| 436 | return; |
| 437 | } |
| 438 | |
| 439 | Handle<mirror::Class> handle = parent_rti.GetTypeHandle(); |
| 440 | if (handle->IsObjectArrayClass()) { |
| 441 | ReferenceTypeInfo::TypeHandle component_handle = handles->NewHandle(handle->GetComponentType()); |
| 442 | instr->SetReferenceTypeInfo( |
| 443 | ReferenceTypeInfo::Create(component_handle, /* is_exact */ false)); |
| 444 | } else { |
| 445 | // We don't know what the parent actually is, so we fallback to object. |
| 446 | instr->SetReferenceTypeInfo( |
| 447 | ReferenceTypeInfo::Create(object_class_handle, /* is_exact */ false)); |
| 448 | } |
| 449 | |
| 450 | return; |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 451 | } |
| 452 | |
| 453 | bool ReferenceTypePropagation::UpdateReferenceTypeInfo(HInstruction* instr) { |
| 454 | ScopedObjectAccess soa(Thread::Current()); |
| 455 | |
| 456 | ReferenceTypeInfo previous_rti = instr->GetReferenceTypeInfo(); |
| 457 | if (instr->IsBoundType()) { |
| 458 | UpdateBoundType(instr->AsBoundType()); |
| 459 | } else if (instr->IsPhi()) { |
| 460 | UpdatePhi(instr->AsPhi()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 461 | } else if (instr->IsNullCheck()) { |
| 462 | ReferenceTypeInfo parent_rti = instr->InputAt(0)->GetReferenceTypeInfo(); |
| 463 | if (parent_rti.IsValid()) { |
| 464 | instr->SetReferenceTypeInfo(parent_rti); |
| 465 | } |
| 466 | } else if (instr->IsArrayGet()) { |
| 467 | // TODO: consider if it's worth "looking back" and bounding the input object |
| 468 | // to an array type. |
| 469 | UpdateArrayGet(instr->AsArrayGet(), handles_, object_class_handle_); |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 470 | } else { |
| 471 | LOG(FATAL) << "Invalid instruction (should not get here)"; |
| 472 | } |
| 473 | |
| 474 | return !previous_rti.IsEqual(instr->GetReferenceTypeInfo()); |
| 475 | } |
| 476 | |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 477 | void RTPVisitor::VisitInvoke(HInvoke* instr) { |
| 478 | if (instr->GetType() != Primitive::kPrimNot) { |
| 479 | return; |
| 480 | } |
| 481 | |
| 482 | ScopedObjectAccess soa(Thread::Current()); |
| 483 | ClassLinker* cl = Runtime::Current()->GetClassLinker(); |
| 484 | mirror::DexCache* dex_cache = cl->FindDexCache(instr->GetDexFile()); |
| 485 | ArtMethod* method = dex_cache->GetResolvedMethod( |
| 486 | instr->GetDexMethodIndex(), cl->GetImagePointerSize()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 487 | mirror::Class* klass = method == nullptr ? nullptr : method->GetReturnType(false); |
| 488 | SetClassAsTypeInfo(instr, klass, /* is_exact */ false); |
Guillaume "Vermeille" Sanchez | ae09d2d | 2015-05-29 10:52:55 +0100 | [diff] [blame] | 489 | } |
| 490 | |
Guillaume "Vermeille" Sanchez | 72a5eb5 | 2015-06-02 17:39:45 +0100 | [diff] [blame] | 491 | void RTPVisitor::VisitArrayGet(HArrayGet* instr) { |
| 492 | if (instr->GetType() != Primitive::kPrimNot) { |
| 493 | return; |
| 494 | } |
Guillaume "Vermeille" Sanchez | 72a5eb5 | 2015-06-02 17:39:45 +0100 | [diff] [blame] | 495 | ScopedObjectAccess soa(Thread::Current()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 496 | UpdateArrayGet(instr, handles_, object_class_handle_); |
| 497 | if (!instr->GetReferenceTypeInfo().IsValid()) { |
| 498 | // If the RTI is not valid it means it depends on instruction for which we |
| 499 | // don't have the final information before the fix point iteration. So we |
| 500 | // need to add it to the worklist. |
| 501 | worklist_->Add(instr); |
Guillaume "Vermeille" Sanchez | 72a5eb5 | 2015-06-02 17:39:45 +0100 | [diff] [blame] | 502 | } |
| 503 | } |
| 504 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 505 | void ReferenceTypePropagation::UpdateBoundType(HBoundType* instr) { |
| 506 | ReferenceTypeInfo new_rti = instr->InputAt(0)->GetReferenceTypeInfo(); |
| 507 | // Be sure that we don't go over the bounded type. |
| 508 | ReferenceTypeInfo bound_rti = instr->GetBoundType(); |
| 509 | if (!bound_rti.IsSupertypeOf(new_rti)) { |
| 510 | new_rti = bound_rti; |
| 511 | } |
| 512 | instr->SetReferenceTypeInfo(new_rti); |
| 513 | } |
| 514 | |
| 515 | void ReferenceTypePropagation::UpdatePhi(HPhi* instr) { |
| 516 | ReferenceTypeInfo new_rti = instr->InputAt(0)->GetReferenceTypeInfo(); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 517 | if (new_rti.IsObjectClass() && !new_rti.IsExact()) { |
| 518 | // Early return if we are Object and inexact. |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 519 | instr->SetReferenceTypeInfo(new_rti); |
| 520 | return; |
| 521 | } |
| 522 | for (size_t i = 1; i < instr->InputCount(); i++) { |
| 523 | new_rti = MergeTypes(new_rti, instr->InputAt(i)->GetReferenceTypeInfo()); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 524 | if (new_rti.IsObjectClass()) { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 525 | if (!new_rti.IsExact()) { |
| 526 | break; |
| 527 | } else { |
| 528 | continue; |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame] | 529 | } |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 530 | } |
| 531 | } |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 532 | instr->SetReferenceTypeInfo(new_rti); |
| 533 | } |
| 534 | |
| 535 | // Re-computes and updates the nullability of the instruction. Returns whether or |
| 536 | // not the nullability was changed. |
| 537 | bool ReferenceTypePropagation::UpdateNullability(HInstruction* instr) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 538 | DCHECK(instr->IsPhi() |
| 539 | || instr->IsBoundType() |
| 540 | || instr->IsNullCheck() |
| 541 | || instr->IsArrayGet()); |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 542 | |
| 543 | if (!instr->IsPhi()) { |
| 544 | return false; |
| 545 | } |
| 546 | |
| 547 | HPhi* phi = instr->AsPhi(); |
| 548 | bool existing_can_be_null = phi->CanBeNull(); |
| 549 | bool new_can_be_null = false; |
| 550 | for (size_t i = 0; i < phi->InputCount(); i++) { |
| 551 | new_can_be_null |= phi->InputAt(i)->CanBeNull(); |
| 552 | } |
| 553 | phi->SetCanBeNull(new_can_be_null); |
| 554 | |
| 555 | return existing_can_be_null != new_can_be_null; |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 556 | } |
| 557 | |
| 558 | void ReferenceTypePropagation::ProcessWorklist() { |
| 559 | while (!worklist_.IsEmpty()) { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 560 | HInstruction* instruction = worklist_.Pop(); |
Calin Juravle | acf735c | 2015-02-12 15:25:22 +0000 | [diff] [blame] | 561 | if (UpdateNullability(instruction) || UpdateReferenceTypeInfo(instruction)) { |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 562 | AddDependentInstructionsToWorklist(instruction); |
| 563 | } |
| 564 | } |
| 565 | } |
| 566 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 567 | void ReferenceTypePropagation::AddToWorklist(HInstruction* instruction) { |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 568 | DCHECK_EQ(instruction->GetType(), Primitive::kPrimNot) |
| 569 | << instruction->DebugName() << ":" << instruction->GetType(); |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 570 | worklist_.Add(instruction); |
| 571 | } |
| 572 | |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 573 | void ReferenceTypePropagation::AddDependentInstructionsToWorklist(HInstruction* instruction) { |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 574 | for (HUseIterator<HInstruction*> it(instruction->GetUses()); !it.Done(); it.Advance()) { |
Calin Juravle | b1498f6 | 2015-02-16 13:13:29 +0000 | [diff] [blame] | 575 | HInstruction* user = it.Current()->GetUser(); |
Calin Juravle | 20e6071 | 2015-07-01 18:41:04 +0100 | [diff] [blame^] | 576 | if (user->IsPhi() |
| 577 | || user->IsBoundType() |
| 578 | || user->IsNullCheck() |
| 579 | || (user->IsArrayGet() && (user->GetType() == Primitive::kPrimNot))) { |
| 580 | AddToWorklist(user); |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 581 | } |
| 582 | } |
| 583 | } |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 584 | } // namespace art |