| 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 6635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6646 } | 6646 } |
| 6647 } else { | 6647 } else { |
| 6648 // Since we will emit an instance check we have to conservatively | 6648 // Since we will emit an instance check we have to conservatively |
| 6649 // assume that some arrays will contain slow elements, so we set | 6649 // assume that some arrays will contain slow elements, so we set |
| 6650 // fast_mode to false. | 6650 // fast_mode to false. |
| 6651 map_mode = false; | 6651 map_mode = false; |
| 6652 fast_mode = false; | 6652 fast_mode = false; |
| 6653 is_array = true; | 6653 is_array = true; |
| 6654 for (int i = 0; i < types->length(); i++) { | 6654 for (int i = 0; i < types->length(); i++) { |
| 6655 Handle<Map> current_map = types->at(i); | 6655 Handle<Map> current_map = types->at(i); |
| 6656 if (!current_map->instance_type() == JS_ARRAY_TYPE) { | 6656 if (current_map->instance_type() != JS_ARRAY_TYPE) { |
| 6657 is_array = false; | 6657 is_array = false; |
| 6658 break; | 6658 break; |
| 6659 } | 6659 } |
| 6660 } | 6660 } |
| 6661 } | 6661 } |
| 6662 | 6662 |
| 6663 // It is an array length access so we produce a HJSArrayLength. | 6663 // It is an array length access so we produce a HJSArrayLength. |
| 6664 if (is_array) { | 6664 if (is_array) { |
| 6665 HValue* array = Pop(); | 6665 HValue* array = Pop(); |
| 6666 AddInstruction(new(zone()) HCheckNonSmi(array)); | 6666 AddInstruction(new(zone()) HCheckNonSmi(array)); |
| (...skipping 3434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10101 } | 10101 } |
| 10102 } | 10102 } |
| 10103 | 10103 |
| 10104 #ifdef DEBUG | 10104 #ifdef DEBUG |
| 10105 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 10105 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 10106 if (allocator_ != NULL) allocator_->Verify(); | 10106 if (allocator_ != NULL) allocator_->Verify(); |
| 10107 #endif | 10107 #endif |
| 10108 } | 10108 } |
| 10109 | 10109 |
| 10110 } } // namespace v8::internal | 10110 } } // namespace v8::internal |
| OLD | NEW |