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

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

Issue 19661003: Merged r15267, r15610, r15723, r15724, r15725, r15728 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 5 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/hydrogen.cc ('k') | src/objects.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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 } 1148 }
1149 } 1149 }
1150 1150
1151 1151
1152 void HBoundsCheck::InferRepresentation(HInferRepresentation* h_infer) { 1152 void HBoundsCheck::InferRepresentation(HInferRepresentation* h_infer) {
1153 ASSERT(CheckFlag(kFlexibleRepresentation)); 1153 ASSERT(CheckFlag(kFlexibleRepresentation));
1154 HValue* actual_index = index()->ActualValue(); 1154 HValue* actual_index = index()->ActualValue();
1155 HValue* actual_length = length()->ActualValue(); 1155 HValue* actual_length = length()->ActualValue();
1156 Representation index_rep = actual_index->representation(); 1156 Representation index_rep = actual_index->representation();
1157 Representation length_rep = actual_length->representation(); 1157 Representation length_rep = actual_length->representation();
1158 if (index_rep.IsTagged()) index_rep = Representation::Smi(); 1158 if (index_rep.IsTagged() && actual_index->type().IsSmi()) {
1159 if (length_rep.IsTagged()) length_rep = Representation::Smi(); 1159 index_rep = Representation::Smi();
1160 }
1161 if (length_rep.IsTagged() && actual_length->type().IsSmi()) {
1162 length_rep = Representation::Smi();
1163 }
1160 Representation r = index_rep.generalize(length_rep); 1164 Representation r = index_rep.generalize(length_rep);
1161 if (r.is_more_general_than(Representation::Integer32())) { 1165 if (r.is_more_general_than(Representation::Integer32())) {
1162 r = Representation::Integer32(); 1166 r = Representation::Integer32();
1163 } 1167 }
1164 UpdateRepresentation(r, h_infer, "boundscheck"); 1168 UpdateRepresentation(r, h_infer, "boundscheck");
1165 } 1169 }
1166 1170
1167 1171
1168 bool HBoundsCheckBaseIndexInformation::IsRelationTrueInternal( 1172 bool HBoundsCheckBaseIndexInformation::IsRelationTrueInternal(
1169 NumericRelation relation, 1173 NumericRelation relation,
(...skipping 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after
3866 case kBackingStore: 3870 case kBackingStore:
3867 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3871 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3868 stream->Add("[backing-store]"); 3872 stream->Add("[backing-store]");
3869 break; 3873 break;
3870 } 3874 }
3871 3875
3872 stream->Add("@%d", offset()); 3876 stream->Add("@%d", offset());
3873 } 3877 }
3874 3878
3875 } } // namespace v8::internal 3879 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698