| OLD | NEW |
| 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 4124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4135 // use ObjectGraph). | 4135 // use ObjectGraph). |
| 4136 PageSpace* old_space = heap->old_space(); | 4136 PageSpace* old_space = heap->old_space(); |
| 4137 { | 4137 { |
| 4138 MonitorLocker ml(old_space->tasks_lock()); | 4138 MonitorLocker ml(old_space->tasks_lock()); |
| 4139 while (old_space->tasks() > 0) { | 4139 while (old_space->tasks() > 0) { |
| 4140 ml.Wait(); | 4140 ml.Wait(); |
| 4141 } | 4141 } |
| 4142 } | 4142 } |
| 4143 GrowableArray<Object*> objects; | 4143 GrowableArray<Object*> objects; |
| 4144 ObjectAccumulator acc(&objects); | 4144 ObjectAccumulator acc(&objects); |
| 4145 heap->IterateObjects(&acc); | 4145 heap->VisitObjects(&acc); |
| 4146 for (intptr_t i = 0; i < objects.length(); ++i) { | 4146 for (intptr_t i = 0; i < objects.length(); ++i) { |
| 4147 JSONStream js; | 4147 JSONStream js; |
| 4148 objects[i]->PrintJSON(&js, false); | 4148 objects[i]->PrintJSON(&js, false); |
| 4149 EXPECT_SUBSTRING("\"type\":", js.ToCString()); | 4149 EXPECT_SUBSTRING("\"type\":", js.ToCString()); |
| 4150 } | 4150 } |
| 4151 } | 4151 } |
| 4152 | 4152 |
| 4153 | 4153 |
| 4154 // Elide a substring which starts with some prefix and ends with a ". | 4154 // Elide a substring which starts with some prefix and ends with a ". |
| 4155 // | 4155 // |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4475 EXPECT_VALID(h_result); | 4475 EXPECT_VALID(h_result); |
| 4476 Integer& result = Integer::Handle(); | 4476 Integer& result = Integer::Handle(); |
| 4477 result ^= Api::UnwrapHandle(h_result); | 4477 result ^= Api::UnwrapHandle(h_result); |
| 4478 String& foo = String::Handle(String::New("foo")); | 4478 String& foo = String::Handle(String::New("foo")); |
| 4479 Integer& expected = Integer::Handle(); | 4479 Integer& expected = Integer::Handle(); |
| 4480 expected ^= foo.HashCode(); | 4480 expected ^= foo.HashCode(); |
| 4481 EXPECT(result.IsIdenticalTo(expected)); | 4481 EXPECT(result.IsIdenticalTo(expected)); |
| 4482 } | 4482 } |
| 4483 | 4483 |
| 4484 } // namespace dart | 4484 } // namespace dart |
| OLD | NEW |