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

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

Issue 1016503005: Rename NoGCScope -> NoSafepointScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/object_graph.h" 6 #include "vm/object_graph.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 a.SetAt(10, b); 52 a.SetAt(10, b);
53 b.SetAt(0, c); 53 b.SetAt(0, c);
54 b.SetAt(1, d); 54 b.SetAt(1, d);
55 a.SetAt(11, d); 55 a.SetAt(11, d);
56 intptr_t a_size = a.raw()->Size(); 56 intptr_t a_size = a.raw()->Size();
57 intptr_t b_size = b.raw()->Size(); 57 intptr_t b_size = b.raw()->Size();
58 intptr_t c_size = c.raw()->Size(); 58 intptr_t c_size = c.raw()->Size();
59 intptr_t d_size = d.raw()->Size(); 59 intptr_t d_size = d.raw()->Size();
60 { 60 {
61 // No more allocation; raw pointers ahead. 61 // No more allocation; raw pointers ahead.
62 NoGCScope no_gc_scope; 62 NoSafepointScope no_safepoint_scope;
63 RawObject* b_raw = b.raw(); 63 RawObject* b_raw = b.raw();
64 // Clear handles to cut unintended retained paths. 64 // Clear handles to cut unintended retained paths.
65 b = Array::null(); 65 b = Array::null();
66 c = Array::null(); 66 c = Array::null();
67 d = Array::null(); 67 d = Array::null();
68 ObjectGraph graph(isolate); 68 ObjectGraph graph(isolate);
69 { 69 {
70 // Compare count and size when 'b' is/isn't skipped. 70 // Compare count and size when 'b' is/isn't skipped.
71 CounterVisitor with(Object::null(), Object::null()); 71 CounterVisitor with(Object::null(), Object::null());
72 graph.IterateObjectsFrom(a, &with); 72 graph.IterateObjectsFrom(a, &with);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Array& expected_a = Array::Handle(); 130 Array& expected_a = Array::Handle();
131 expected_a ^= path.At(4); 131 expected_a ^= path.At(4);
132 EXPECT(expected_c.raw() == c.raw()); 132 EXPECT(expected_c.raw() == c.raw());
133 EXPECT(expected_b.raw() == a.At(10)); 133 EXPECT(expected_b.raw() == a.At(10));
134 EXPECT(expected_a.raw() == a.raw()); 134 EXPECT(expected_a.raw() == a.raw());
135 } 135 }
136 } 136 }
137 } 137 }
138 138
139 } // namespace dart 139 } // 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