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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/conversions-inl.h" | |
9 #include "src/isolate-inl.h" | |
10 #include "src/regexp/jsregexp-inl.h" | 8 #include "src/regexp/jsregexp-inl.h" |
11 #include "src/regexp/jsregexp.h" | |
12 #include "src/string-builder.h" | 9 #include "src/string-builder.h" |
13 #include "src/string-search.h" | 10 #include "src/string-search.h" |
14 | 11 |
15 namespace v8 { | 12 namespace v8 { |
16 namespace internal { | 13 namespace internal { |
17 | 14 |
18 | 15 |
19 // Perform string match of pattern on subject, starting at start index. | 16 // Perform string match of pattern on subject, starting at start index. |
20 // Caller must ensure that 0 <= start_index <= sub->length(), | 17 // Caller must ensure that 0 <= start_index <= sub->length(), |
21 // and should check that pat->length() + start_index <= sub->length(). | 18 // and should check that pat->length() + start_index <= sub->length(). |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 SealHandleScope shs(isolate); | 1322 SealHandleScope shs(isolate); |
1326 DCHECK(args.length() == 2); | 1323 DCHECK(args.length() == 2); |
1327 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); | 1324 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); |
1328 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); | 1325 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); |
1329 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); | 1326 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); |
1330 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); | 1327 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); |
1331 } | 1328 } |
1332 | 1329 |
1333 } // namespace internal | 1330 } // namespace internal |
1334 } // namespace v8 | 1331 } // namespace v8 |
OLD | NEW |