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

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

Issue 25696004: Add support to load/store byte fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also adjust HLoadNamedField::InferRange. Created 7 years, 2 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
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 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 : new(zone) Range(); 2822 : new(zone) Range();
2823 result->Shl(c->Integer32Value()); 2823 result->Shl(c->Integer32Value());
2824 return result; 2824 return result;
2825 } 2825 }
2826 } 2826 }
2827 return HValue::InferRange(zone); 2827 return HValue::InferRange(zone);
2828 } 2828 }
2829 2829
2830 2830
2831 Range* HLoadNamedField::InferRange(Zone* zone) { 2831 Range* HLoadNamedField::InferRange(Zone* zone) {
2832 if (access().representation().IsByte()) {
2833 return new(zone) Range(0, 255);
2834 }
2832 if (access().IsStringLength()) { 2835 if (access().IsStringLength()) {
2833 return new(zone) Range(0, String::kMaxLength); 2836 return new(zone) Range(0, String::kMaxLength);
2834 } 2837 }
2835 return HValue::InferRange(zone); 2838 return HValue::InferRange(zone);
2836 } 2839 }
2837 2840
2838 2841
2839 Range* HLoadKeyed::InferRange(Zone* zone) { 2842 Range* HLoadKeyed::InferRange(Zone* zone) {
2840 switch (elements_kind()) { 2843 switch (elements_kind()) {
2841 case EXTERNAL_PIXEL_ELEMENTS: 2844 case EXTERNAL_PIXEL_ELEMENTS:
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
4268 break; 4271 break;
4269 case kExternalMemory: 4272 case kExternalMemory:
4270 stream->Add("[external-memory]"); 4273 stream->Add("[external-memory]");
4271 break; 4274 break;
4272 } 4275 }
4273 4276
4274 stream->Add("@%d", offset()); 4277 stream->Add("@%d", offset());
4275 } 4278 }
4276 4279
4277 } } // namespace v8::internal 4280 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698