| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
| 7 #include "vm/exceptions.h" | 7 #include "vm/exceptions.h" |
| 8 #include "vm/native_entry.h" | 8 #include "vm/native_entry.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/regexp_parser.h" | 10 #include "vm/regexp_parser.h" |
| 11 | 11 |
| 12 #include "lib/regexp_jsc.h" | 12 #include "lib/regexp_jsc.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 DECLARE_FLAG(bool, trace_irregexp); | 16 DECLARE_FLAG(bool, trace_irregexp); |
| 17 DEFINE_FLAG(bool, use_jscre, true, "Use the JSCRE regular expression engine"); | 17 DEFINE_FLAG(bool, use_jscre, false, "Use the JSCRE regular expression engine"); |
| 18 | 18 |
| 19 | 19 |
| 20 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_factory, 4) { | 20 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_factory, 4) { |
| 21 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull()); | 21 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull()); |
| 22 GET_NON_NULL_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1)); | 22 GET_NON_NULL_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1)); |
| 23 GET_NON_NULL_NATIVE_ARGUMENT( | 23 GET_NON_NULL_NATIVE_ARGUMENT( |
| 24 Instance, handle_multi_line, arguments->NativeArgAt(2)); | 24 Instance, handle_multi_line, arguments->NativeArgAt(2)); |
| 25 GET_NON_NULL_NATIVE_ARGUMENT( | 25 GET_NON_NULL_NATIVE_ARGUMENT( |
| 26 Instance, handle_case_sensitive, arguments->NativeArgAt(3)); | 26 Instance, handle_case_sensitive, arguments->NativeArgAt(3)); |
| 27 bool ignore_case = handle_case_sensitive.raw() != Bool::True().raw(); | 27 bool ignore_case = handle_case_sensitive.raw() != Bool::True().raw(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Retrieve the cached function. | 100 // Retrieve the cached function. |
| 101 const Function& fn = Function::Handle(regexp.function(cid)); | 101 const Function& fn = Function::Handle(regexp.function(cid)); |
| 102 ASSERT(!fn.IsNull()); | 102 ASSERT(!fn.IsNull()); |
| 103 | 103 |
| 104 // And finally call the generated code. | 104 // And finally call the generated code. |
| 105 return IRRegExpMacroAssembler::Execute(fn, str, start_index, isolate); | 105 return IRRegExpMacroAssembler::Execute(fn, str, start_index, isolate); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace dart | 108 } // namespace dart |
| OLD | NEW |