| OLD | NEW |
| 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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 if (is_store && IsFastSmiElementsKind(elements_kind) && | 1348 if (is_store && IsFastSmiElementsKind(elements_kind) && |
| 1349 !val->type().IsSmi()) { | 1349 !val->type().IsSmi()) { |
| 1350 AddInstruction(new(zone) HCheckSmi(val)); | 1350 AddInstruction(new(zone) HCheckSmi(val)); |
| 1351 } | 1351 } |
| 1352 | 1352 |
| 1353 if (IsGrowStoreMode(store_mode)) { | 1353 if (IsGrowStoreMode(store_mode)) { |
| 1354 NoObservableSideEffectsScope no_effects(this); | 1354 NoObservableSideEffectsScope no_effects(this); |
| 1355 | 1355 |
| 1356 elements = BuildCheckForCapacityGrow(object, elements, elements_kind, | 1356 elements = BuildCheckForCapacityGrow(object, elements, elements_kind, |
| 1357 length, key, is_js_array); | 1357 length, key, is_js_array); |
| 1358 checked_key = key; | 1358 if (!key->type().IsSmi()) { |
| 1359 checked_key = AddInstruction(new(zone) HCheckSmiOrInt32(key)); |
| 1360 } else { |
| 1361 checked_key = key; |
| 1362 } |
| 1359 } else { | 1363 } else { |
| 1360 checked_key = AddBoundsCheck( | 1364 checked_key = AddBoundsCheck( |
| 1361 key, length, ALLOW_SMI_KEY, checked_index_representation); | 1365 key, length, ALLOW_SMI_KEY, checked_index_representation); |
| 1362 | 1366 |
| 1363 if (is_store && (fast_elements || fast_smi_only_elements)) { | 1367 if (is_store && (fast_elements || fast_smi_only_elements)) { |
| 1364 if (store_mode == STORE_NO_TRANSITION_HANDLE_COW) { | 1368 if (store_mode == STORE_NO_TRANSITION_HANDLE_COW) { |
| 1365 NoObservableSideEffectsScope no_effects(this); | 1369 NoObservableSideEffectsScope no_effects(this); |
| 1366 | 1370 |
| 1367 elements = BuildCopyElementsOnWrite(object, elements, elements_kind, | 1371 elements = BuildCopyElementsOnWrite(object, elements, elements_kind, |
| 1368 length); | 1372 length); |
| (...skipping 10503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11872 } | 11876 } |
| 11873 } | 11877 } |
| 11874 | 11878 |
| 11875 #ifdef DEBUG | 11879 #ifdef DEBUG |
| 11876 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11880 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 11877 if (allocator_ != NULL) allocator_->Verify(); | 11881 if (allocator_ != NULL) allocator_->Verify(); |
| 11878 #endif | 11882 #endif |
| 11879 } | 11883 } |
| 11880 | 11884 |
| 11881 } } // namespace v8::internal | 11885 } } // namespace v8::internal |
| OLD | NEW |