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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 173115: Change some integer types to make the x64 Win32 platform happier. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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 | « src/utils.h ('k') | 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 6246 matching lines...) Expand 10 before | Expand all | Expand 10 after
6257 unsigned int unsigned_left = left; 6257 unsigned int unsigned_left = left;
6258 if (left < 0) { 6258 if (left < 0) {
6259 // Perform arithmetic shift of a negative number by 6259 // Perform arithmetic shift of a negative number by
6260 // complementing number, logical shifting, complementing again. 6260 // complementing number, logical shifting, complementing again.
6261 unsigned_left = ~unsigned_left; 6261 unsigned_left = ~unsigned_left;
6262 unsigned_left >>= shift_amount; 6262 unsigned_left >>= shift_amount;
6263 unsigned_left = ~unsigned_left; 6263 unsigned_left = ~unsigned_left;
6264 } else { 6264 } else {
6265 unsigned_left >>= shift_amount; 6265 unsigned_left >>= shift_amount;
6266 } 6266 }
6267 ASSERT(Smi::IsValid(unsigned_left)); // Converted to signed. 6267 ASSERT(Smi::IsValid(static_cast<int32_t>(unsigned_left)));
6268 answer_object = Smi::FromInt(unsigned_left); // Converted to signed. 6268 answer_object = Smi::FromInt(static_cast<int32_t>(unsigned_left));
6269 break; 6269 break;
6270 } 6270 }
6271 default: 6271 default:
6272 UNREACHABLE(); 6272 UNREACHABLE();
6273 break; 6273 break;
6274 } 6274 }
6275 if (answer_object == Heap::undefined_value()) { 6275 if (answer_object == Heap::undefined_value()) {
6276 return false; 6276 return false;
6277 } 6277 }
6278 frame_->Push(Handle<Object>(answer_object)); 6278 frame_->Push(Handle<Object>(answer_object));
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
7698 int CompareStub::MinorKey() { 7698 int CompareStub::MinorKey() {
7699 // Encode the two parameters in a unique 16 bit value. 7699 // Encode the two parameters in a unique 16 bit value.
7700 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7700 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7701 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7701 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7702 } 7702 }
7703 7703
7704 7704
7705 #undef __ 7705 #undef __
7706 7706
7707 } } // namespace v8::internal 7707 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698