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

Side by Side Diff: src/hydrogen-load-elimination.cc

Issue 66193004: Reland 17588: Add signed/unsigned 8-bit and 16-bit Representations to Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Latest version 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.cc ('k') | src/ia32/lithium-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 HObjectAccess access = instr->access(); 265 HObjectAccess access = instr->access();
266 if (access.IsInobject()) { 266 if (access.IsInobject()) {
267 int offset = access.offset(); 267 int offset = access.offset();
268 if ((offset % kPointerSize) != 0) { 268 if ((offset % kPointerSize) != 0) {
269 // Kill the field containing the first word of the access. 269 // Kill the field containing the first word of the access.
270 HValue* object = instr->object()->ActualValue(); 270 HValue* object = instr->object()->ActualValue();
271 int field = offset / kPointerSize; 271 int field = offset / kPointerSize;
272 KillFieldInternal(object, field, NULL); 272 KillFieldInternal(object, field, NULL);
273 273
274 // Kill the next field in case of overlap. 274 // Kill the next field in case of overlap.
275 int size = kPointerSize; 275 int size = access.representation().size();
276 if (access.representation().IsByte()) size = 1;
277 else if (access.representation().IsInteger32()) size = 4;
278 int next_field = (offset + size - 1) / kPointerSize; 276 int next_field = (offset + size - 1) / kPointerSize;
279 if (next_field != field) KillFieldInternal(object, next_field, NULL); 277 if (next_field != field) KillFieldInternal(object, next_field, NULL);
280 } 278 }
281 } 279 }
282 return instr; 280 return instr;
283 } 281 }
284 282
285 // Find an entry for the given object and field pair. 283 // Find an entry for the given object and field pair.
286 HFieldApproximation* Find(HValue* object, int field) { 284 HFieldApproximation* Find(HValue* object, int field) {
287 // Search for a field approximation for this object. 285 // Search for a field approximation for this object.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } else { 499 } else {
502 // Perform only local analysis. 500 // Perform only local analysis.
503 for (int i = 0; i < graph()->blocks()->length(); i++) { 501 for (int i = 0; i < graph()->blocks()->length(); i++) {
504 table->Kill(); 502 table->Kill();
505 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); 503 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table);
506 } 504 }
507 } 505 }
508 } 506 }
509 507
510 } } // namespace v8::internal 508 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698