| 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_assembler_ir.h" | 5 #include "vm/regexp_assembler_ir.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 void IRRegExpMacroAssembler::FinalizeRegistersArray() { | 298 void IRRegExpMacroAssembler::FinalizeRegistersArray() { |
| 299 ASSERT(registers_count_ >= saved_registers_count_); | 299 ASSERT(registers_count_ >= saved_registers_count_); |
| 300 registers_array_ = | 300 registers_array_ = |
| 301 TypedData::New(kTypedDataInt32ArrayCid, registers_count_, Heap::kOld); | 301 TypedData::New(kTypedDataInt32ArrayCid, registers_count_, Heap::kOld); |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 #if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_ARM) || \ | 305 #if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_ARM) |
| 306 defined(TARGET_ARCH_MIPS) | |
| 307 // Disabling unaligned accesses forces the regexp engine to load characters one | 306 // Disabling unaligned accesses forces the regexp engine to load characters one |
| 308 // by one instead of up to 4 at once, along with the associated performance hit. | 307 // by one instead of up to 4 at once, along with the associated performance hit. |
| 309 // TODO(zerny): Be less conservative about disabling unaligned accesses. | 308 // TODO(zerny): Be less conservative about disabling unaligned accesses. |
| 310 // For instance, ARMv6 supports unaligned accesses. Once it is enabled here, | 309 // For instance, ARMv6 supports unaligned accesses. Once it is enabled here, |
| 311 // update LoadCodeUnitsInstr methods for the appropriate architectures. | 310 // update LoadCodeUnitsInstr methods for the appropriate architectures. |
| 312 static const bool kEnableUnalignedAccesses = false; | 311 static const bool kEnableUnalignedAccesses = false; |
| 313 #else | 312 #else |
| 314 static const bool kEnableUnalignedAccesses = true; | 313 static const bool kEnableUnalignedAccesses = true; |
| 315 #endif | 314 #endif |
| 316 bool IRRegExpMacroAssembler::CanReadUnaligned() { | 315 bool IRRegExpMacroAssembler::CanReadUnaligned() { |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 | 1851 |
| 1853 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, | 1852 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, |
| 1854 specialization_cid_, | 1853 specialization_cid_, |
| 1855 TokenPosition::kNoSource)); | 1854 TokenPosition::kNoSource)); |
| 1856 } | 1855 } |
| 1857 | 1856 |
| 1858 | 1857 |
| 1859 #undef __ | 1858 #undef __ |
| 1860 | 1859 |
| 1861 } // namespace dart | 1860 } // namespace dart |
| OLD | NEW |