OLD | NEW |
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 Loading... |
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 = access.representation().size(); | 275 int size = kPointerSize; |
| 276 if (access.representation().IsByte()) size = 1; |
| 277 else if (access.representation().IsInteger32()) size = 4; |
276 int next_field = (offset + size - 1) / kPointerSize; | 278 int next_field = (offset + size - 1) / kPointerSize; |
277 if (next_field != field) KillFieldInternal(object, next_field, NULL); | 279 if (next_field != field) KillFieldInternal(object, next_field, NULL); |
278 } | 280 } |
279 } | 281 } |
280 return instr; | 282 return instr; |
281 } | 283 } |
282 | 284 |
283 // Find an entry for the given object and field pair. | 285 // Find an entry for the given object and field pair. |
284 HFieldApproximation* Find(HValue* object, int field) { | 286 HFieldApproximation* Find(HValue* object, int field) { |
285 // Search for a field approximation for this object. | 287 // Search for a field approximation for this object. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 } else { | 501 } else { |
500 // Perform only local analysis. | 502 // Perform only local analysis. |
501 for (int i = 0; i < graph()->blocks()->length(); i++) { | 503 for (int i = 0; i < graph()->blocks()->length(); i++) { |
502 table->Kill(); | 504 table->Kill(); |
503 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); | 505 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); |
504 } | 506 } |
505 } | 507 } |
506 } | 508 } |
507 | 509 |
508 } } // namespace v8::internal | 510 } } // namespace v8::internal |
OLD | NEW |