OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/jsregexp-inl.h" | 8 #include "src/jsregexp-inl.h" |
9 #include "src/jsregexp.h" | 9 #include "src/jsregexp.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 if (regexp->CaptureCount() == 0) { | 1103 if (regexp->CaptureCount() == 0) { |
1104 return SearchRegExpMultiple<false>(isolate, subject, regexp, | 1104 return SearchRegExpMultiple<false>(isolate, subject, regexp, |
1105 last_match_info, result_array); | 1105 last_match_info, result_array); |
1106 } else { | 1106 } else { |
1107 return SearchRegExpMultiple<true>(isolate, subject, regexp, last_match_info, | 1107 return SearchRegExpMultiple<true>(isolate, subject, regexp, last_match_info, |
1108 result_array); | 1108 result_array); |
1109 } | 1109 } |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
| 1113 RUNTIME_FUNCTION(Runtime_RegExpExecReThrow) { |
| 1114 SealHandleScope shs(isolate); |
| 1115 DCHECK(args.length() == 4); |
| 1116 Object* exception = isolate->pending_exception(); |
| 1117 isolate->clear_pending_exception(); |
| 1118 return isolate->ReThrow(exception); |
| 1119 } |
| 1120 |
| 1121 |
1113 RUNTIME_FUNCTION(Runtime_IsRegExp) { | 1122 RUNTIME_FUNCTION(Runtime_IsRegExp) { |
1114 SealHandleScope shs(isolate); | 1123 SealHandleScope shs(isolate); |
1115 DCHECK(args.length() == 1); | 1124 DCHECK(args.length() == 1); |
1116 CONVERT_ARG_CHECKED(Object, obj, 0); | 1125 CONVERT_ARG_CHECKED(Object, obj, 0); |
1117 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); | 1126 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); |
1118 } | 1127 } |
1119 } | 1128 } |
1120 } // namespace v8::internal | 1129 } // namespace v8::internal |
OLD | NEW |