Index: runtime/vm/regexp.cc |
diff --git a/runtime/vm/regexp.cc b/runtime/vm/regexp.cc |
index e49c3d8253c2e3169b6dc0edecde52ed47abb0e1..9daab26a9c5a4e3a35fd7c152a95032dda9a43f2 100644 |
--- a/runtime/vm/regexp.cc |
+++ b/runtime/vm/regexp.cc |
@@ -5317,14 +5317,16 @@ RawJSRegExp* RegExpEngine::CreateJSRegExp(Zone* zone, |
regexp.set_is_complex(); |
regexp.set_is_global(); // All dart regexps are global. |
- const Library& lib = Library::Handle(zone, Library::CoreLibrary()); |
- const Class& owner = Class::Handle( |
- zone, lib.LookupClass(Symbols::RegExp())); |
- |
- CreateSpecializedFunction(zone, regexp, kOneByteStringCid, owner); |
- CreateSpecializedFunction(zone, regexp, kTwoByteStringCid, owner); |
- CreateSpecializedFunction(zone, regexp, kExternalOneByteStringCid, owner); |
- CreateSpecializedFunction(zone, regexp, kExternalTwoByteStringCid, owner); |
+ if (!FLAG_interpret_irregexp) { |
+ const Library& lib = Library::Handle(zone, Library::CoreLibrary()); |
+ const Class& owner = Class::Handle( |
+ zone, lib.LookupClass(Symbols::RegExp())); |
+ |
+ CreateSpecializedFunction(zone, regexp, kOneByteStringCid, owner); |
+ CreateSpecializedFunction(zone, regexp, kTwoByteStringCid, owner); |
+ CreateSpecializedFunction(zone, regexp, kExternalOneByteStringCid, owner); |
+ CreateSpecializedFunction(zone, regexp, kExternalTwoByteStringCid, owner); |
+ } |
return regexp.raw(); |
} |