| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/regexp.h" | 5 #include "vm/regexp.h" |
| 6 | 6 |
| 7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
| 8 #include "vm/regexp_assembler.h" | 8 #include "vm/regexp_assembler.h" |
| 9 #include "vm/regexp_ast.h" | 9 #include "vm/regexp_ast.h" |
| 10 #include "vm/unibrow-inl.h" | 10 #include "vm/unibrow-inl.h" |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1800 // | 1800 // |
| 1801 // We iterate along the text object, building up for each character a | 1801 // We iterate along the text object, building up for each character a |
| 1802 // mask and value that can be used to test for a quick failure to match. | 1802 // mask and value that can be used to test for a quick failure to match. |
| 1803 // The masks and values for the positions will be combined into a single | 1803 // The masks and values for the positions will be combined into a single |
| 1804 // machine word for the current character width in order to be used in | 1804 // machine word for the current character width in order to be used in |
| 1805 // generating a quick check. | 1805 // generating a quick check. |
| 1806 void TextNode::GetQuickCheckDetails(QuickCheckDetails* details, | 1806 void TextNode::GetQuickCheckDetails(QuickCheckDetails* details, |
| 1807 RegExpCompiler* compiler, | 1807 RegExpCompiler* compiler, |
| 1808 intptr_t characters_filled_in, | 1808 intptr_t characters_filled_in, |
| 1809 bool not_at_start) { | 1809 bool not_at_start) { |
| 1810 #if defined(__GNUC__) | 1810 #if defined(__GNUC__) && defined(__BYTE_ORDER__) |
| 1811 // TODO(zerny): Make the combination code byte-order independent. | 1811 // TODO(zerny): Make the combination code byte-order independent. |
| 1812 ASSERT(details->characters() == 1 || | 1812 ASSERT(details->characters() == 1 || |
| 1813 (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)); | 1813 (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)); |
| 1814 #endif | 1814 #endif |
| 1815 ASSERT(characters_filled_in < details->characters()); | 1815 ASSERT(characters_filled_in < details->characters()); |
| 1816 intptr_t characters = details->characters(); | 1816 intptr_t characters = details->characters(); |
| 1817 intptr_t char_mask; | 1817 intptr_t char_mask; |
| 1818 if (compiler->one_byte()) { | 1818 if (compiler->one_byte()) { |
| 1819 char_mask = Symbols::kMaxOneCharCodeSymbol; | 1819 char_mask = Symbols::kMaxOneCharCodeSymbol; |
| 1820 } else { | 1820 } else { |
| (...skipping 3339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5160 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); | 5160 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); |
| 5161 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); | 5161 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); |
| 5162 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); | 5162 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); |
| 5163 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); | 5163 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); |
| 5164 | 5164 |
| 5165 return regexp.raw(); | 5165 return regexp.raw(); |
| 5166 } | 5166 } |
| 5167 | 5167 |
| 5168 | 5168 |
| 5169 } // namespace dart | 5169 } // namespace dart |
| OLD | NEW |