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

Unified Diff: runtime/vm/object.cc

Issue 1914293002: Cleanup some handle creation code, was showing up in the CompileAll testing that we are doing with … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8e214c7beb5553cbbe82f13282948ce32a1efcd8..a94ad1284e04db27dfb93c3b1001e80b9af66d98 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -16336,14 +16336,13 @@ void Type::SetIsResolved() const {
bool Type::HasResolvedTypeClass() const {
- const Object& type_class = Object::Handle(raw_ptr()->type_class_);
- return !type_class.IsNull() && type_class.IsClass();
+ return (raw_ptr()->type_class_->GetClassId() == kClassCid);
}
RawClass* Type::type_class() const {
- ASSERT(HasResolvedTypeClass());
#ifdef DEBUG
+ ASSERT(HasResolvedTypeClass());
Class& type_class = Class::Handle();
type_class ^= raw_ptr()->type_class_;
return type_class.raw();
@@ -16354,8 +16353,8 @@ RawClass* Type::type_class() const {
RawUnresolvedClass* Type::unresolved_class() const {
- ASSERT(!HasResolvedTypeClass());
#ifdef DEBUG
+ ASSERT(!HasResolvedTypeClass());
UnresolvedClass& unresolved_class = UnresolvedClass::Handle();
unresolved_class ^= raw_ptr()->type_class_;
ASSERT(!unresolved_class.IsNull());
@@ -16492,7 +16491,7 @@ bool Type::IsEquivalent(const Instance& other, TrailPtr trail) const {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
if (arguments() != other_type.arguments()) {
- const Class& cls = Class::Handle(zone, type_class());
+ const Class& cls = Class::Handle(zone, type_class());
const intptr_t num_type_params = cls.NumTypeParameters(thread);
// Shortcut unnecessary handle allocation below if non-generic.
if (num_type_params > 0) {
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698