| 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_assembler_bytecode.h" | 9 #include "vm/regexp_assembler_bytecode.h" |
| 10 #include "vm/regexp_assembler_ir.h" | 10 #include "vm/regexp_assembler_ir.h" |
| (...skipping 5299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5310 } | 5310 } |
| 5311 if (ignore_case) { | 5311 if (ignore_case) { |
| 5312 regexp.set_is_ignore_case(); | 5312 regexp.set_is_ignore_case(); |
| 5313 } | 5313 } |
| 5314 | 5314 |
| 5315 // TODO(zerny): We might want to use normal string searching algorithms | 5315 // TODO(zerny): We might want to use normal string searching algorithms |
| 5316 // for simple patterns. | 5316 // for simple patterns. |
| 5317 regexp.set_is_complex(); | 5317 regexp.set_is_complex(); |
| 5318 regexp.set_is_global(); // All dart regexps are global. | 5318 regexp.set_is_global(); // All dart regexps are global. |
| 5319 | 5319 |
| 5320 const Library& lib = Library::Handle(zone, Library::CoreLibrary()); | 5320 if (!FLAG_interpret_irregexp) { |
| 5321 const Class& owner = Class::Handle( | 5321 const Library& lib = Library::Handle(zone, Library::CoreLibrary()); |
| 5322 zone, lib.LookupClass(Symbols::RegExp())); | 5322 const Class& owner = Class::Handle( |
| 5323 zone, lib.LookupClass(Symbols::RegExp())); |
| 5323 | 5324 |
| 5324 CreateSpecializedFunction(zone, regexp, kOneByteStringCid, owner); | 5325 CreateSpecializedFunction(zone, regexp, kOneByteStringCid, owner); |
| 5325 CreateSpecializedFunction(zone, regexp, kTwoByteStringCid, owner); | 5326 CreateSpecializedFunction(zone, regexp, kTwoByteStringCid, owner); |
| 5326 CreateSpecializedFunction(zone, regexp, kExternalOneByteStringCid, owner); | 5327 CreateSpecializedFunction(zone, regexp, kExternalOneByteStringCid, owner); |
| 5327 CreateSpecializedFunction(zone, regexp, kExternalTwoByteStringCid, owner); | 5328 CreateSpecializedFunction(zone, regexp, kExternalTwoByteStringCid, owner); |
| 5329 } |
| 5328 | 5330 |
| 5329 return regexp.raw(); | 5331 return regexp.raw(); |
| 5330 } | 5332 } |
| 5331 | 5333 |
| 5332 | 5334 |
| 5333 } // namespace dart | 5335 } // namespace dart |
| OLD | NEW |