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

Unified Diff: vm/heap_test.cc

Issue 8761006: - Implement a simple old-generation marker. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/heap.cc ('k') | vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap_test.cc
===================================================================
--- vm/heap_test.cc (revision 1929)
+++ vm/heap_test.cc (working copy)
@@ -2,4 +2,31 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// TODO(iposva): Intentionally left blank for now.
+#include "vm/assert.h"
+#include "vm/globals.h"
+#include "vm/heap.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+#if defined(TARGET_ARCH_IA32)
+TEST_CASE(OldGC) {
+ const char* kScriptChars =
+ "class HeapTester {\n"
+ " static void main() {\n"
+ " return [1, 2, 3];\n"
+ " }\n"
+ "}\n";
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+ Dart_Handle result = Dart_InvokeStatic(lib,
+ Dart_NewString("HeapTester"),
+ Dart_NewString("main"),
+ 0, NULL);
+
+ EXPECT_VALID(result);
+ Isolate* isolate = Isolate::Current();
+ Heap* heap = isolate->heap();
+ heap->CollectGarbage(Heap::kOld);
+}
+#endif // TARGET_ARCH_IA32
+}
« no previous file with comments | « vm/heap.cc ('k') | vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698