| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 HChange::cast(use)->to().IsSmi() || | 47 HChange::cast(use)->to().IsSmi() || |
| 48 HChange::cast(use)->to().IsTagged()); | 48 HChange::cast(use)->to().IsTagged()); |
| 49 return true; | 49 return true; |
| 50 } else if (use->IsStoreKeyed()) { | 50 } else if (use->IsStoreKeyed()) { |
| 51 HStoreKeyed* store = HStoreKeyed::cast(use); | 51 HStoreKeyed* store = HStoreKeyed::cast(use); |
| 52 if (store->is_external()) { | 52 if (store->is_external()) { |
| 53 // Storing a value into an external integer array is a bit level | 53 // Storing a value into an external integer array is a bit level |
| 54 // operation. | 54 // operation. |
| 55 if (store->value() == val) { | 55 if (store->value() == val) { |
| 56 // Clamping or a conversion to double should have beed inserted. | 56 // Clamping or a conversion to double should have beed inserted. |
| 57 ASSERT(store->elements_kind() != EXTERNAL_PIXEL_ELEMENTS); | 57 ASSERT(store->elements_kind() != EXTERNAL_UINT8_CLAMPED_ELEMENTS); |
| 58 ASSERT(store->elements_kind() != EXTERNAL_FLOAT_ELEMENTS); | 58 ASSERT(store->elements_kind() != EXTERNAL_FLOAT32_ELEMENTS); |
| 59 ASSERT(store->elements_kind() != EXTERNAL_DOUBLE_ELEMENTS); | 59 ASSERT(store->elements_kind() != EXTERNAL_FLOAT64_ELEMENTS); |
| 60 return true; | 60 return true; |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 return false; | 65 return false; |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 // Iterate over all uses and verify that they are uint32 safe: either don't | 69 // Iterate over all uses and verify that they are uint32 safe: either don't |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 // Some phis might have been optimistically marked with kUint32 flag. | 228 // Some phis might have been optimistically marked with kUint32 flag. |
| 229 // Remove this flag from those phis that are unsafe and propagate | 229 // Remove this flag from those phis that are unsafe and propagate |
| 230 // this information transitively potentially clearing kUint32 flag | 230 // this information transitively potentially clearing kUint32 flag |
| 231 // from some non-phi operations that are used as operands to unsafe phis. | 231 // from some non-phi operations that are used as operands to unsafe phis. |
| 232 UnmarkUnsafePhis(); | 232 UnmarkUnsafePhis(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 } } // namespace v8::internal | 236 } } // namespace v8::internal |
| OLD | NEW |