Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1094)

Side by Side Diff: runtime/vm/regexp.cc

Issue 1814983004: Don't create matcher functions when interpreting regex. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698