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.h" | 8 #include "src/conversions.h" |
9 #include "src/counters.h" | 9 #include "src/counters.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 Handle<String> GetPrefix() override { return prefix_; } | 34 Handle<String> GetPrefix() override { return prefix_; } |
35 Handle<String> GetSuffix() override { return suffix_; } | 35 Handle<String> GetSuffix() override { return suffix_; } |
36 | 36 |
37 int CaptureCount() override { return 0; } | 37 int CaptureCount() override { return 0; } |
38 bool HasNamedCaptures() override { return false; } | 38 bool HasNamedCaptures() override { return false; } |
39 MaybeHandle<String> GetCapture(int i, bool* capture_exists) override { | 39 MaybeHandle<String> GetCapture(int i, bool* capture_exists) override { |
40 *capture_exists = false; | 40 *capture_exists = false; |
41 return match_; // Return arbitrary string handle. | 41 return match_; // Return arbitrary string handle. |
42 } | 42 } |
43 MaybeHandle<String> GetNamedCapture(Handle<String> name, | 43 MaybeHandle<String> GetNamedCapture(Handle<String> name, |
44 bool* capture_exists) override { | 44 CaptureState* state) override { |
45 UNREACHABLE(); | 45 UNREACHABLE(); |
| 46 *state = INVALID; |
46 return MaybeHandle<String>(); | 47 return MaybeHandle<String>(); |
47 } | 48 } |
48 | 49 |
49 private: | 50 private: |
50 Handle<String> match_, prefix_, suffix_; | 51 Handle<String> match_, prefix_, suffix_; |
51 }; | 52 }; |
52 | 53 |
53 Handle<String> prefix = | 54 Handle<String> prefix = |
54 isolate->factory()->NewSubString(subject, 0, position); | 55 isolate->factory()->NewSubString(subject, 0, position); |
55 Handle<String> suffix = isolate->factory()->NewSubString( | 56 Handle<String> suffix = isolate->factory()->NewSubString( |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 SealHandleScope shs(isolate); | 753 SealHandleScope shs(isolate); |
753 DCHECK_EQ(2, args.length()); | 754 DCHECK_EQ(2, args.length()); |
754 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); | 755 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); |
755 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); | 756 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); |
756 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); | 757 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); |
757 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); | 758 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); |
758 } | 759 } |
759 | 760 |
760 } // namespace internal | 761 } // namespace internal |
761 } // namespace v8 | 762 } // namespace v8 |
OLD | NEW |