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

Unified Diff: test/cctest/test-heap.cc

Issue 1539033: Fix build problems on Windows 64-bit by casting. (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« src/runtime.cc ('K') | « test/cctest/test-cpu-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index bfadd208b6b8bde14e096359fce5914a9ea56f13..41be8c07dbf43d293bb47d083be0903aedf80b6f 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -821,19 +821,20 @@ TEST(LargeObjectSpaceContains) {
Page* page = Page::FromAddress(current_top);
Address current_page = page->address();
Address next_page = current_page + Page::kPageSize;
- int bytes_to_page = next_page - current_top;
+ int bytes_to_page = static_cast<int>(next_page - current_top);
if (bytes_to_page <= FixedArray::kHeaderSize) {
// Alas, need to cross another page to be able to
// put desired value.
next_page += Page::kPageSize;
- bytes_to_page = next_page - current_top;
+ bytes_to_page = static_cast<int>(next_page - current_top);
}
CHECK(bytes_to_page > FixedArray::kHeaderSize);
int* is_normal_page_ptr = &Page::FromAddress(next_page)->is_normal_page;
Address is_normal_page_addr = reinterpret_cast<Address>(is_normal_page_ptr);
- int bytes_to_allocate = (is_normal_page_addr - current_top) + kPointerSize;
+ int bytes_to_allocate =
+ static_cast<int>(is_normal_page_addr - current_top) + kPointerSize;
int n_elements = (bytes_to_allocate - FixedArray::kHeaderSize) /
kPointerSize;
@@ -917,7 +918,7 @@ TEST(Regression39128) {
}
// Step 3: now allocate fixed array and JSObject to fill the whole new space.
- int to_fill = *limit_addr - *top_addr - object_size;
+ int to_fill = static_cast<int>(*limit_addr - *top_addr - object_size);
int fixed_array_len = LenFromSize(to_fill);
CHECK(fixed_array_len < FixedArray::kMaxLength);
@@ -935,7 +936,7 @@ TEST(Regression39128) {
// Create a reference to object in new space in jsobject.
jsobject->FastPropertyAtPut(-1, array);
- CHECK_EQ(0L, (*limit_addr - *top_addr));
+ CHECK_EQ(0, static_cast<int>(*limit_addr - *top_addr));
// Step 4: clone jsobject, but force always allocate first to create a clone
// in old pointer space.
« src/runtime.cc ('K') | « test/cctest/test-cpu-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698