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

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

Issue 243673002: Fix x64 GC test: ensure huge is huge enough. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 // TODO(zra): Remove when tests are ready to enable. 5 // TODO(zra): Remove when tests are ready to enable.
6 #include "platform/globals.h" 6 #include "platform/globals.h"
7 #if !defined(TARGET_ARCH_ARM64) 7 #if !defined(TARGET_ARCH_ARM64)
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 weak = Dart_NewWeakPersistentHandle(dead, 2368 weak = Dart_NewWeakPersistentHandle(dead,
2369 NULL, 2369 NULL,
2370 kSmallExternalSize, 2370 kSmallExternalSize,
2371 NopCallback); 2371 NopCallback);
2372 EXPECT_VALID(AsHandle(weak)); 2372 EXPECT_VALID(AsHandle(weak));
2373 Dart_ExitScope(); 2373 Dart_ExitScope();
2374 } 2374 }
2375 EXPECT_EQ(kSmallExternalSize, 2375 EXPECT_EQ(kSmallExternalSize,
2376 isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize); 2376 isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize);
2377 // Large enough to trigger GC in old space. Not actually allocated. 2377 // Large enough to trigger GC in old space. Not actually allocated.
2378 const intptr_t kHugeExternalSize = 1000 * MB; 2378 const intptr_t kHugeExternalSize = Heap::kHeapSizeInMB * MB;
2379 Dart_NewWeakPersistentHandle(live, 2379 Dart_NewWeakPersistentHandle(live,
2380 NULL, 2380 NULL,
2381 kHugeExternalSize, 2381 kHugeExternalSize,
2382 NopCallback); 2382 NopCallback);
2383 // Expect small garbage to be collected. 2383 // Expect small garbage to be collected.
2384 EXPECT_EQ(kHugeExternalSize, 2384 EXPECT_EQ(kHugeExternalSize,
2385 isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize); 2385 isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize);
2386 Dart_DeleteWeakPersistentHandle(reinterpret_cast<Dart_Isolate>(isolate), 2386 Dart_DeleteWeakPersistentHandle(reinterpret_cast<Dart_Isolate>(isolate),
2387 weak); 2387 weak);
2388 Dart_ExitScope(); 2388 Dart_ExitScope();
(...skipping 5748 matching lines...) Expand 10 before | Expand all | Expand 10 after
8137 dart_args); 8137 dart_args);
8138 int64_t value = 0; 8138 int64_t value = 0;
8139 result = Dart_IntegerToInt64(result, &value); 8139 result = Dart_IntegerToInt64(result, &value);
8140 EXPECT_VALID(result); 8140 EXPECT_VALID(result);
8141 EXPECT_EQ(6, value); 8141 EXPECT_EQ(6, value);
8142 } 8142 }
8143 8143
8144 } // namespace dart 8144 } // namespace dart
8145 8145
8146 #endif // !defined(TARGET_ARCH_ARM64) 8146 #endif // !defined(TARGET_ARCH_ARM64)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698