Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1740 // load so the value is already masked down. | 1740 // load so the value is already masked down. |
| 1741 uint32_t char_mask; | 1741 uint32_t char_mask; |
| 1742 if (compiler->ascii()) { | 1742 if (compiler->ascii()) { |
| 1743 char_mask = String::kMaxAsciiCharCode; | 1743 char_mask = String::kMaxAsciiCharCode; |
| 1744 } else { | 1744 } else { |
| 1745 char_mask = String::kMaxUC16CharCode; | 1745 char_mask = String::kMaxUC16CharCode; |
| 1746 } | 1746 } |
| 1747 if ((mask & char_mask) == char_mask) need_mask = false; | 1747 if ((mask & char_mask) == char_mask) need_mask = false; |
| 1748 mask &= char_mask; | 1748 mask &= char_mask; |
| 1749 } else { | 1749 } else { |
| 1750 // For 2-character preloads in ASCII mode we also use a 16 bit load with | 1750 // For 2-character preloads in ASCII mode we also use a 16 bit load with |
|
Søren Thygesen Gjesse
2010/06/21 21:39:26
This comment should maybe cover both the ASCII and
| |
| 1751 // zero extend. | 1751 // zero extend. |
| 1752 if (details->characters() == 2 && compiler->ascii()) { | 1752 if (details->characters() == 2 && compiler->ascii()) { |
| 1753 if ((mask & 0x7f7f) == 0x7f7f) need_mask = false; | |
| 1754 } else if (details->characters() == 1 && !compiler->ascii()) { | |
| 1753 if ((mask & 0xffff) == 0xffff) need_mask = false; | 1755 if ((mask & 0xffff) == 0xffff) need_mask = false; |
| 1754 } else { | 1756 } else { |
| 1755 if (mask == 0xffffffff) need_mask = false; | 1757 if (mask == 0xffffffff) need_mask = false; |
| 1756 } | 1758 } |
| 1757 } | 1759 } |
| 1758 | 1760 |
| 1759 if (fall_through_on_failure) { | 1761 if (fall_through_on_failure) { |
| 1760 if (need_mask) { | 1762 if (need_mask) { |
| 1761 assembler->CheckCharacterAfterAnd(value, mask, on_possible_success); | 1763 assembler->CheckCharacterAfterAnd(value, mask, on_possible_success); |
| 1762 } else { | 1764 } else { |
| (...skipping 3495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5258 node, | 5260 node, |
| 5259 data->capture_count, | 5261 data->capture_count, |
| 5260 pattern); | 5262 pattern); |
| 5261 } | 5263 } |
| 5262 | 5264 |
| 5263 | 5265 |
| 5264 int OffsetsVector::static_offsets_vector_[ | 5266 int OffsetsVector::static_offsets_vector_[ |
| 5265 OffsetsVector::kStaticOffsetsVectorSize]; | 5267 OffsetsVector::kStaticOffsetsVectorSize]; |
| 5266 | 5268 |
| 5267 }} // namespace v8::internal | 5269 }} // namespace v8::internal |
| OLD | NEW |