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" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ExecuteMatch, 3) { | 84 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ExecuteMatch, 3) { |
85 // This function is intrinsified. See Intrinsifier::JSRegExp_ExecuteMatch. | 85 // This function is intrinsified. See Intrinsifier::JSRegExp_ExecuteMatch. |
86 const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0)); | 86 const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0)); |
87 ASSERT(!regexp.IsNull()); | 87 ASSERT(!regexp.IsNull()); |
88 GET_NON_NULL_NATIVE_ARGUMENT(String, subject, arguments->NativeArgAt(1)); | 88 GET_NON_NULL_NATIVE_ARGUMENT(String, subject, arguments->NativeArgAt(1)); |
89 GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2)); | 89 GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2)); |
90 | 90 |
91 if (FLAG_interpret_irregexp) { | 91 if (FLAG_interpret_irregexp || FLAG_precompiled_runtime) { |
92 return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index, | 92 return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index, |
93 zone); | 93 zone); |
94 } | 94 } |
95 | 95 |
96 return IRRegExpMacroAssembler::Execute(regexp, subject, start_index, zone); | 96 return IRRegExpMacroAssembler::Execute(regexp, subject, start_index, zone); |
97 } | 97 } |
98 | 98 |
99 } // namespace dart | 99 } // namespace dart |
OLD | NEW |