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

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

Issue 2794583002: Revert "Reland "VM: Handle null-comparisons in the flow graph type propagation"" (Closed)
Patch Set: Created 3 years, 8 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 | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 cls = Class::New<Instance>(kIllegalCid); 1602 cls = Class::New<Instance>(kIllegalCid);
1603 RegisterClass(cls, Symbols::Int(), core_lib); 1603 RegisterClass(cls, Symbols::Int(), core_lib);
1604 cls.set_num_type_arguments(0); 1604 cls.set_num_type_arguments(0);
1605 cls.set_num_own_type_arguments(0); 1605 cls.set_num_own_type_arguments(0);
1606 cls.set_is_prefinalized(); 1606 cls.set_is_prefinalized();
1607 pending_classes.Add(cls); 1607 pending_classes.Add(cls);
1608 type = Type::NewNonParameterizedType(cls); 1608 type = Type::NewNonParameterizedType(cls);
1609 object_store->set_int_type(type); 1609 object_store->set_int_type(type);
1610 1610
1611 cls = Class::New<Instance>(kIllegalCid); 1611 cls = Class::New<Instance>(kIllegalCid);
1612 RegisterPrivateClass(cls, Symbols::Int64(), core_lib);
1613 cls.set_num_type_arguments(0);
1614 cls.set_num_own_type_arguments(0);
1615 cls.set_is_prefinalized();
1616 pending_classes.Add(cls);
1617 type = Type::NewNonParameterizedType(cls);
1618 object_store->set_int64_type(type);
1619
1620 cls = Class::New<Instance>(kIllegalCid);
1621 RegisterClass(cls, Symbols::Double(), core_lib); 1612 RegisterClass(cls, Symbols::Double(), core_lib);
1622 cls.set_num_type_arguments(0); 1613 cls.set_num_type_arguments(0);
1623 cls.set_num_own_type_arguments(0); 1614 cls.set_num_own_type_arguments(0);
1624 cls.set_is_prefinalized(); 1615 cls.set_is_prefinalized();
1625 pending_classes.Add(cls); 1616 pending_classes.Add(cls);
1626 type = Type::NewNonParameterizedType(cls); 1617 type = Type::NewNonParameterizedType(cls);
1627 object_store->set_double_type(type); 1618 object_store->set_double_type(type);
1628 1619
1629 name = Symbols::_String().raw(); 1620 name = Symbols::_String().raw();
1630 cls = Class::New<Instance>(kIllegalCid); 1621 cls = Class::New<Instance>(kIllegalCid);
(...skipping 14814 matching lines...) Expand 10 before | Expand all | Expand 10 after
16445 (type_class() == Isolate::Current()->object_store()->bool_class()); 16436 (type_class() == Isolate::Current()->object_store()->bool_class());
16446 } 16437 }
16447 16438
16448 16439
16449 bool AbstractType::IsIntType() const { 16440 bool AbstractType::IsIntType() const {
16450 return !IsFunctionType() && HasResolvedTypeClass() && 16441 return !IsFunctionType() && HasResolvedTypeClass() &&
16451 (type_class() == Type::Handle(Type::IntType()).type_class()); 16442 (type_class() == Type::Handle(Type::IntType()).type_class());
16452 } 16443 }
16453 16444
16454 16445
16455 bool AbstractType::IsInt64Type() const {
16456 return !IsFunctionType() && HasResolvedTypeClass() &&
16457 (type_class() == Type::Handle(Type::Int64Type()).type_class());
16458 }
16459
16460
16461 bool AbstractType::IsDoubleType() const { 16446 bool AbstractType::IsDoubleType() const {
16462 return !IsFunctionType() && HasResolvedTypeClass() && 16447 return !IsFunctionType() && HasResolvedTypeClass() &&
16463 (type_class() == Type::Handle(Type::Double()).type_class()); 16448 (type_class() == Type::Handle(Type::Double()).type_class());
16464 } 16449 }
16465 16450
16466 16451
16467 bool AbstractType::IsFloat32x4Type() const { 16452 bool AbstractType::IsFloat32x4Type() const {
16468 return !IsFunctionType() && HasResolvedTypeClass() && 16453 return !IsFunctionType() && HasResolvedTypeClass() &&
16469 (type_class() == Type::Handle(Type::Float32x4()).type_class()); 16454 (type_class() == Type::Handle(Type::Float32x4()).type_class());
16470 } 16455 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
16696 RawType* Type::BoolType() { 16681 RawType* Type::BoolType() {
16697 return Isolate::Current()->object_store()->bool_type(); 16682 return Isolate::Current()->object_store()->bool_type();
16698 } 16683 }
16699 16684
16700 16685
16701 RawType* Type::IntType() { 16686 RawType* Type::IntType() {
16702 return Isolate::Current()->object_store()->int_type(); 16687 return Isolate::Current()->object_store()->int_type();
16703 } 16688 }
16704 16689
16705 16690
16706 RawType* Type::Int64Type() {
16707 return Isolate::Current()->object_store()->int64_type();
16708 }
16709
16710
16711 RawType* Type::SmiType() { 16691 RawType* Type::SmiType() {
16712 return Isolate::Current()->object_store()->smi_type(); 16692 return Isolate::Current()->object_store()->smi_type();
16713 } 16693 }
16714 16694
16715 16695
16716 RawType* Type::MintType() { 16696 RawType* Type::MintType() {
16717 return Isolate::Current()->object_store()->mint_type(); 16697 return Isolate::Current()->object_store()->mint_type();
16718 } 16698 }
16719 16699
16720 16700
(...skipping 6407 matching lines...) Expand 10 before | Expand all | Expand 10 after
23128 return UserTag::null(); 23108 return UserTag::null();
23129 } 23109 }
23130 23110
23131 23111
23132 const char* UserTag::ToCString() const { 23112 const char* UserTag::ToCString() const {
23133 const String& tag_label = String::Handle(label()); 23113 const String& tag_label = String::Handle(label());
23134 return tag_label.ToCString(); 23114 return tag_label.ToCString();
23135 } 23115 }
23136 23116
23137 } // namespace dart 23117 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698