Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: runtime/vm/aot_optimizer.cc

Issue 2759393005: Cleanup change. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/aot_optimizer.h" 5 #include "vm/aot_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 // necessary. 1400 // necessary.
1401 // TODO(srdjan): Do also for other than 'int' type. 1401 // TODO(srdjan): Do also for other than 'int' type.
1402 static bool TryExpandTestCidsResult(ZoneGrowableArray<intptr_t>* results, 1402 static bool TryExpandTestCidsResult(ZoneGrowableArray<intptr_t>* results,
1403 const AbstractType& type) { 1403 const AbstractType& type) {
1404 ASSERT(results->length() >= 2); // At least on entry. 1404 ASSERT(results->length() >= 2); // At least on entry.
1405 const ClassTable& class_table = *Isolate::Current()->class_table(); 1405 const ClassTable& class_table = *Isolate::Current()->class_table();
1406 if ((*results)[0] != kSmiCid) { 1406 if ((*results)[0] != kSmiCid) {
1407 const Class& cls = Class::Handle(class_table.At(kSmiCid)); 1407 const Class& cls = Class::Handle(class_table.At(kSmiCid));
1408 const Class& type_class = Class::Handle(type.type_class()); 1408 const Class& type_class = Class::Handle(type.type_class());
1409 const bool smi_is_subtype = 1409 const bool smi_is_subtype =
1410 cls.IsSubtypeOf(TypeArguments::Handle(), type_class, 1410 cls.IsSubtypeOf(Object::null_type_arguments(), type_class,
1411 TypeArguments::Handle(), NULL, NULL, Heap::kOld); 1411 Object::null_type_arguments(), NULL, NULL, Heap::kOld);
1412 results->Add((*results)[results->length() - 2]); 1412 results->Add((*results)[results->length() - 2]);
1413 results->Add((*results)[results->length() - 2]); 1413 results->Add((*results)[results->length() - 2]);
1414 for (intptr_t i = results->length() - 3; i > 1; --i) { 1414 for (intptr_t i = results->length() - 3; i > 1; --i) {
1415 (*results)[i] = (*results)[i - 2]; 1415 (*results)[i] = (*results)[i - 2];
1416 } 1416 }
1417 (*results)[0] = kSmiCid; 1417 (*results)[0] = kSmiCid;
1418 (*results)[1] = smi_is_subtype; 1418 (*results)[1] = smi_is_subtype;
1419 } 1419 }
1420 1420
1421 ASSERT(type.IsInstantiated() && !type.IsMalformedOrMalbounded()); 1421 ASSERT(type.IsInstantiated() && !type.IsMalformedOrMalbounded());
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 FlowGraph::kEffect); 2132 FlowGraph::kEffect);
2133 current_iterator()->RemoveCurrentFromGraph(); 2133 current_iterator()->RemoveCurrentFromGraph();
2134 } 2134 }
2135 } 2135 }
2136 } 2136 }
2137 } 2137 }
2138 2138
2139 #endif // DART_PRECOMPILER 2139 #endif // DART_PRECOMPILER
2140 2140
2141 } // namespace dart 2141 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698