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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 66553004: Revert "Add signed/unsigned 8-bit and 16-bit Representations to Crankshaft" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/hydrogen-instructions.h ('k') | src/hydrogen-load-elimination.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 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 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 : new(zone) Range(); 2849 : new(zone) Range();
2850 result->Shl(c->Integer32Value()); 2850 result->Shl(c->Integer32Value());
2851 return result; 2851 return result;
2852 } 2852 }
2853 } 2853 }
2854 return HValue::InferRange(zone); 2854 return HValue::InferRange(zone);
2855 } 2855 }
2856 2856
2857 2857
2858 Range* HLoadNamedField::InferRange(Zone* zone) { 2858 Range* HLoadNamedField::InferRange(Zone* zone) {
2859 if (access().representation().IsInteger8()) { 2859 if (access().representation().IsByte()) {
2860 return new(zone) Range(kMinInt8, kMaxInt8); 2860 return new(zone) Range(0, 255);
2861 }
2862 if (access().representation().IsUInteger8()) {
2863 return new(zone) Range(kMinUInt8, kMaxUInt8);
2864 }
2865 if (access().representation().IsInteger16()) {
2866 return new(zone) Range(kMinInt16, kMaxInt16);
2867 }
2868 if (access().representation().IsUInteger16()) {
2869 return new(zone) Range(kMinUInt16, kMaxUInt16);
2870 } 2861 }
2871 if (access().IsStringLength()) { 2862 if (access().IsStringLength()) {
2872 return new(zone) Range(0, String::kMaxLength); 2863 return new(zone) Range(0, String::kMaxLength);
2873 } 2864 }
2874 return HValue::InferRange(zone); 2865 return HValue::InferRange(zone);
2875 } 2866 }
2876 2867
2877 2868
2878 Range* HLoadKeyed::InferRange(Zone* zone) { 2869 Range* HLoadKeyed::InferRange(Zone* zone) {
2879 switch (elements_kind()) { 2870 switch (elements_kind()) {
2871 case EXTERNAL_PIXEL_ELEMENTS:
2872 return new(zone) Range(0, 255);
2880 case EXTERNAL_BYTE_ELEMENTS: 2873 case EXTERNAL_BYTE_ELEMENTS:
2881 return new(zone) Range(kMinInt8, kMaxInt8); 2874 return new(zone) Range(-128, 127);
2882 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 2875 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
2883 case EXTERNAL_PIXEL_ELEMENTS: 2876 return new(zone) Range(0, 255);
2884 return new(zone) Range(kMinUInt8, kMaxUInt8);
2885 case EXTERNAL_SHORT_ELEMENTS: 2877 case EXTERNAL_SHORT_ELEMENTS:
2886 return new(zone) Range(kMinInt16, kMaxInt16); 2878 return new(zone) Range(-32768, 32767);
2887 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 2879 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
2888 return new(zone) Range(kMinUInt16, kMaxUInt16); 2880 return new(zone) Range(0, 65535);
2889 default: 2881 default:
2890 return HValue::InferRange(zone); 2882 return HValue::InferRange(zone);
2891 } 2883 }
2892 } 2884 }
2893 2885
2894 2886
2895 void HCompareGeneric::PrintDataTo(StringStream* stream) { 2887 void HCompareGeneric::PrintDataTo(StringStream* stream) {
2896 stream->Add(Token::Name(token())); 2888 stream->Add(Token::Name(token()));
2897 stream->Add(" "); 2889 stream->Add(" ");
2898 HBinaryOperation::PrintDataTo(stream); 2890 HBinaryOperation::PrintDataTo(stream);
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
4326 break; 4318 break;
4327 case kExternalMemory: 4319 case kExternalMemory:
4328 stream->Add("[external-memory]"); 4320 stream->Add("[external-memory]");
4329 break; 4321 break;
4330 } 4322 }
4331 4323
4332 stream->Add("@%d", offset()); 4324 stream->Add("@%d", offset());
4333 } 4325 }
4334 4326
4335 } } // namespace v8::internal 4327 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-load-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698