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

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

Issue 3007603002: [VM generic function reification] Support generic functions in Invocation class. (Closed)
Patch Set: address review comment Created 3 years, 3 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/snapshot.cc ('k') | tests/language_2/generic_no_such_method_dispatcher_test.dart » ('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/verifier.h" 5 #include "vm/verifier.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/freelist.h" 10 #include "vm/freelist.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 VerifyWeakPointersVisitor weak_visitor(&visitor); 79 VerifyWeakPointersVisitor weak_visitor(&visitor);
80 // Visit weak handles and prologue weak handles. 80 // Visit weak handles and prologue weak handles.
81 isolate->VisitWeakPersistentHandles(&weak_visitor); 81 isolate->VisitWeakPersistentHandles(&weak_visitor);
82 } 82 }
83 83
84 #if defined(DEBUG) 84 #if defined(DEBUG)
85 VerifyCanonicalVisitor::VerifyCanonicalVisitor(Thread* thread) 85 VerifyCanonicalVisitor::VerifyCanonicalVisitor(Thread* thread)
86 : thread_(thread), instanceHandle_(Instance::Handle(thread->zone())) {} 86 : thread_(thread), instanceHandle_(Instance::Handle(thread->zone())) {}
87 87
88 void VerifyCanonicalVisitor::VisitObject(RawObject* obj) { 88 void VerifyCanonicalVisitor::VisitObject(RawObject* obj) {
89 if (obj->GetClassId() >= kInstanceCid) { 89 if ((obj->GetClassId() >= kInstanceCid) &&
90 (obj->GetClassId() != kTypeArgumentsCid)) {
90 if (obj->IsCanonical()) { 91 if (obj->IsCanonical()) {
91 instanceHandle_ ^= obj; 92 instanceHandle_ ^= obj;
92 const bool is_canonical = instanceHandle_.CheckIsCanonical(thread_); 93 const bool is_canonical = instanceHandle_.CheckIsCanonical(thread_);
93 if (!is_canonical) { 94 if (!is_canonical) {
94 OS::PrintErr("Instance `%s` is not canonical!\n", 95 OS::PrintErr("Instance `%s` is not canonical!\n",
95 instanceHandle_.ToCString()); 96 instanceHandle_.ToCString());
96 } 97 }
97 ASSERT(is_canonical); 98 ASSERT(is_canonical);
98 } 99 }
99 } 100 }
100 } 101 }
101 #endif // defined(DEBUG) 102 #endif // defined(DEBUG)
102 103
103 } // namespace dart 104 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | tests/language_2/generic_no_such_method_dispatcher_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698