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

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

Issue 3151017: Make the Integer32 type info only cover the signed 32 bit integers.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 __ mov(tos, Operand(tos, LSL, scratch)); // Shift constant. 1215 __ mov(tos, Operand(tos, LSL, scratch)); // Shift constant.
1216 deferred->BindExit(); 1216 deferred->BindExit();
1217 TypeInfo result = TypeInfo::Integer32(); 1217 TypeInfo result = TypeInfo::Integer32();
1218 frame_->EmitPush(tos, result); 1218 frame_->EmitPush(tos, result);
1219 break; 1219 break;
1220 } 1220 }
1221 // Fall through! 1221 // Fall through!
1222 case Token::SHR: 1222 case Token::SHR:
1223 case Token::SAR: { 1223 case Token::SAR: {
1224 ASSERT(!reversed); 1224 ASSERT(!reversed);
1225 TypeInfo result = TypeInfo::Integer32(); 1225 TypeInfo result =
1226 (op == Token::SAR) ? TypeInfo::Integer32() : TypeInfo::Number();
1227 if (!reversed) {
1228 if (op == Token::SHR) {
1229 if (int_value >= 2) {
1230 result = TypeInfo::Smi();
1231 } else if (int_value >= 1) {
1232 result = TypeInfo::Integer32();
1233 }
1234 } else {
1235 if (int_value >= 1) {
1236 result = TypeInfo::Smi();
1237 }
1238 }
1239 }
1226 Register scratch = VirtualFrame::scratch0(); 1240 Register scratch = VirtualFrame::scratch0();
1227 Register scratch2 = VirtualFrame::scratch1(); 1241 Register scratch2 = VirtualFrame::scratch1();
1228 int shift_value = int_value & 0x1f; // least significant 5 bits 1242 int shift_value = int_value & 0x1f; // least significant 5 bits
1229 DeferredCode* deferred = 1243 DeferredCode* deferred =
1230 new DeferredInlineSmiOperation(op, shift_value, false, mode, tos); 1244 new DeferredInlineSmiOperation(op, shift_value, false, mode, tos);
1231 uint32_t problematic_mask = kSmiTagMask; 1245 uint32_t problematic_mask = kSmiTagMask;
1232 // For unsigned shift by zero all negative smis are problematic. 1246 // For unsigned shift by zero all negative smis are problematic.
1233 bool skip_smi_test = both_sides_are_smi; 1247 bool skip_smi_test = both_sides_are_smi;
1234 if (shift_value == 0 && op == Token::SHR) { 1248 if (shift_value == 0 && op == Token::SHR) {
1235 problematic_mask |= 0x80000000; 1249 problematic_mask |= 0x80000000;
(...skipping 10428 matching lines...) Expand 10 before | Expand all | Expand 10 after
11664 __ bind(&string_add_runtime); 11678 __ bind(&string_add_runtime);
11665 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 11679 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
11666 } 11680 }
11667 11681
11668 11682
11669 #undef __ 11683 #undef __
11670 11684
11671 } } // namespace v8::internal 11685 } } // namespace v8::internal
11672 11686
11673 #endif // V8_TARGET_ARCH_ARM 11687 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698