| 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" | 8 #include "src/conversions-inl.h" |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 | 788 |
| 789 | 789 |
| 790 RUNTIME_FUNCTION(Runtime_RegExpSource) { | 790 RUNTIME_FUNCTION(Runtime_RegExpSource) { |
| 791 SealHandleScope shs(isolate); | 791 SealHandleScope shs(isolate); |
| 792 DCHECK(args.length() == 1); | 792 DCHECK(args.length() == 1); |
| 793 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0); | 793 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0); |
| 794 return regexp->source(); | 794 return regexp->source(); |
| 795 } | 795 } |
| 796 | 796 |
| 797 | 797 // TODO(jgruber): Remove this once all uses in regexp.js have been removed. |
| 798 RUNTIME_FUNCTION(Runtime_RegExpConstructResult) { | 798 RUNTIME_FUNCTION(Runtime_RegExpConstructResult) { |
| 799 HandleScope handle_scope(isolate); | 799 HandleScope handle_scope(isolate); |
| 800 DCHECK(args.length() == 3); | 800 DCHECK(args.length() == 3); |
| 801 CONVERT_SMI_ARG_CHECKED(size, 0); | 801 CONVERT_SMI_ARG_CHECKED(size, 0); |
| 802 CHECK(size >= 0 && size <= FixedArray::kMaxLength); | 802 CHECK(size >= 0 && size <= FixedArray::kMaxLength); |
| 803 CONVERT_ARG_HANDLE_CHECKED(Object, index, 1); | 803 CONVERT_ARG_HANDLE_CHECKED(Object, index, 1); |
| 804 CONVERT_ARG_HANDLE_CHECKED(Object, input, 2); | 804 CONVERT_ARG_HANDLE_CHECKED(Object, input, 2); |
| 805 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size); | 805 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size); |
| 806 Handle<Map> regexp_map(isolate->native_context()->regexp_result_map()); | 806 Handle<Map> regexp_map(isolate->native_context()->regexp_result_map()); |
| 807 Handle<JSObject> object = | 807 Handle<JSObject> object = |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1013 |
| 1014 | 1014 |
| 1015 RUNTIME_FUNCTION(Runtime_IsRegExp) { | 1015 RUNTIME_FUNCTION(Runtime_IsRegExp) { |
| 1016 SealHandleScope shs(isolate); | 1016 SealHandleScope shs(isolate); |
| 1017 DCHECK(args.length() == 1); | 1017 DCHECK(args.length() == 1); |
| 1018 CONVERT_ARG_CHECKED(Object, obj, 0); | 1018 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1019 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); | 1019 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); |
| 1020 } | 1020 } |
| 1021 } // namespace internal | 1021 } // namespace internal |
| 1022 } // namespace v8 | 1022 } // namespace v8 |
| OLD | NEW |