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

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

Issue 1838373002: Remove unnecessary isolate argument from some visitors (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/verifier.h ('k') | runtime/vm/visitor.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/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 24 matching lines...) Expand all
35 break; 35 break;
36 case kRequireMarked: 36 case kRequireMarked:
37 if (!raw_obj->IsMarked()) { 37 if (!raw_obj->IsMarked()) {
38 FATAL1("Unmarked object encountered %#" Px "\n", raw_addr); 38 FATAL1("Unmarked object encountered %#" Px "\n", raw_addr);
39 } 39 }
40 break; 40 break;
41 } 41 }
42 } 42 }
43 } 43 }
44 allocated_set_->Add(raw_obj); 44 allocated_set_->Add(raw_obj);
45 raw_obj->Validate(isolate()); 45 raw_obj->Validate(isolate_);
46 } 46 }
47 47
48 48
49 void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) { 49 void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) {
50 for (RawObject** current = first; current <= last; current++) { 50 for (RawObject** current = first; current <= last; current++) {
51 VerifiedMemory::Verify(reinterpret_cast<uword>(current), kWordSize); 51 VerifiedMemory::Verify(reinterpret_cast<uword>(current), kWordSize);
52 RawObject* raw_obj = *current; 52 RawObject* raw_obj = *current;
53 if (raw_obj->IsHeapObject()) { 53 if (raw_obj->IsHeapObject()) {
54 if (!allocated_set_->Contains(raw_obj)) { 54 if (!allocated_set_->Contains(raw_obj)) {
55 uword raw_addr = RawObject::ToAddr(raw_obj); 55 uword raw_addr = RawObject::ToAddr(raw_obj);
(...skipping 21 matching lines...) Expand all
77 // Visit all strongly reachable objects. 77 // Visit all strongly reachable objects.
78 isolate->IterateObjectPointers(&visitor, 78 isolate->IterateObjectPointers(&visitor,
79 StackFrameIterator::kValidateFrames); 79 StackFrameIterator::kValidateFrames);
80 VerifyWeakPointersVisitor weak_visitor(&visitor); 80 VerifyWeakPointersVisitor weak_visitor(&visitor);
81 // Visit weak handles and prologue weak handles. 81 // Visit weak handles and prologue weak handles.
82 isolate->VisitWeakPersistentHandles(&weak_visitor); 82 isolate->VisitWeakPersistentHandles(&weak_visitor);
83 delete allocated_set; 83 delete allocated_set;
84 } 84 }
85 85
86 } // namespace dart 86 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/verifier.h ('k') | runtime/vm/visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698