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

Side by Side Diff: src/heap.cc

Issue 11636016: Fix windows compile warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 return symbol; 3312 return symbol;
3313 // Now we know the length is 2, we might as well make use of that fact 3313 // Now we know the length is 2, we might as well make use of that fact
3314 // when building the new string. 3314 // when building the new string.
3315 } else if ((c1 | c2) <= String::kMaxAsciiCharCodeU) { // We can do this 3315 } else if ((c1 | c2) <= String::kMaxAsciiCharCodeU) { // We can do this
3316 ASSERT(IsPowerOf2(String::kMaxAsciiCharCodeU + 1)); // because of this. 3316 ASSERT(IsPowerOf2(String::kMaxAsciiCharCodeU + 1)); // because of this.
3317 Object* result; 3317 Object* result;
3318 { MaybeObject* maybe_result = heap->AllocateRawOneByteString(2); 3318 { MaybeObject* maybe_result = heap->AllocateRawOneByteString(2);
3319 if (!maybe_result->ToObject(&result)) return maybe_result; 3319 if (!maybe_result->ToObject(&result)) return maybe_result;
3320 } 3320 }
3321 char* dest = SeqOneByteString::cast(result)->GetChars(); 3321 char* dest = SeqOneByteString::cast(result)->GetChars();
3322 dest[0] = c1; 3322 dest[0] = static_cast<char>(c1);
3323 dest[1] = c2; 3323 dest[1] = static_cast<char>(c2);
3324 return result; 3324 return result;
3325 } else { 3325 } else {
3326 Object* result; 3326 Object* result;
3327 { MaybeObject* maybe_result = heap->AllocateRawTwoByteString(2); 3327 { MaybeObject* maybe_result = heap->AllocateRawTwoByteString(2);
3328 if (!maybe_result->ToObject(&result)) return maybe_result; 3328 if (!maybe_result->ToObject(&result)) return maybe_result;
3329 } 3329 }
3330 uc16* dest = SeqTwoByteString::cast(result)->GetChars(); 3330 uc16* dest = SeqTwoByteString::cast(result)->GetChars();
3331 dest[0] = c1; 3331 dest[0] = c1;
3332 dest[1] = c2; 3332 dest[1] = c2;
3333 return result; 3333 return result;
(...skipping 4139 matching lines...) Expand 10 before | Expand all | Expand 10 after
7473 static_cast<int>(object_sizes_last_time_[index])); 7473 static_cast<int>(object_sizes_last_time_[index]));
7474 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7474 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7475 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7475 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7476 7476
7477 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7477 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7478 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7478 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7479 ClearObjectStats(); 7479 ClearObjectStats();
7480 } 7480 }
7481 7481
7482 } } // namespace v8::internal 7482 } } // namespace v8::internal
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