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

Side by Side Diff: runtime/vm/object_test.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/object_graph.cc ('k') | runtime/vm/pages.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) 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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 EXPECT(array.IsArray()); 4114 EXPECT(array.IsArray());
4115 } 4115 }
4116 4116
4117 4117
4118 #ifndef PRODUCT 4118 #ifndef PRODUCT
4119 4119
4120 4120
4121 class ObjectAccumulator : public ObjectVisitor { 4121 class ObjectAccumulator : public ObjectVisitor {
4122 public: 4122 public:
4123 explicit ObjectAccumulator(GrowableArray<Object*>* objects) 4123 explicit ObjectAccumulator(GrowableArray<Object*>* objects)
4124 : ObjectVisitor(Isolate::Current()), objects_(objects) {} 4124 : objects_(objects) { }
4125 virtual ~ObjectAccumulator() { } 4125 virtual ~ObjectAccumulator() { }
4126 virtual void VisitObject(RawObject* obj) { 4126 virtual void VisitObject(RawObject* obj) {
4127 // Free-list elements cannot even be wrapped in handles. 4127 // Free-list elements cannot even be wrapped in handles.
4128 if (obj->IsFreeListElement()) { 4128 if (obj->IsFreeListElement()) {
4129 return; 4129 return;
4130 } 4130 }
4131 Object& handle = Object::Handle(obj); 4131 Object& handle = Object::Handle(obj);
4132 // Skip some common simple objects to run in reasonable time. 4132 // Skip some common simple objects to run in reasonable time.
4133 if (handle.IsString() || 4133 if (handle.IsString() ||
4134 handle.IsArray() || 4134 handle.IsArray() ||
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
4715 String& test = String::Handle(); 4715 String& test = String::Handle();
4716 String& result = String::Handle(); 4716 String& result = String::Handle();
4717 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { 4717 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
4718 test = String::New(tests[i].in); 4718 test = String::New(tests[i].in);
4719 result = String::ScrubName(test); 4719 result = String::ScrubName(test);
4720 EXPECT_STREQ(tests[i].out, result.ToCString()); 4720 EXPECT_STREQ(tests[i].out, result.ToCString());
4721 } 4721 }
4722 } 4722 }
4723 4723
4724 } // namespace dart 4724 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_graph.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698