Chromium Code Reviews| 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/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 878 } | 878 } |
| 879 | 879 |
| 880 | 880 |
| 881 RUNTIME_FUNCTION(Runtime_ToLength) { | 881 RUNTIME_FUNCTION(Runtime_ToLength) { |
| 882 HandleScope scope(isolate); | 882 HandleScope scope(isolate); |
| 883 DCHECK_EQ(1, args.length()); | 883 DCHECK_EQ(1, args.length()); |
| 884 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); | 884 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); |
| 885 RETURN_RESULT_OR_FAILURE(isolate, Object::ToLength(isolate, input)); | 885 RETURN_RESULT_OR_FAILURE(isolate, Object::ToLength(isolate, input)); |
| 886 } | 886 } |
| 887 | 887 |
| 888 RUNTIME_FUNCTION(Runtime_ToIndex) { | |
| 889 HandleScope scope(isolate); | |
| 890 DCHECK_EQ(1, args.length()); | |
| 891 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); | |
| 892 RETURN_RESULT_OR_FAILURE(isolate, Object::ToIndex(isolate, input)); | |
| 893 } | |
|
Dan Ehrenberg
2016/06/23 21:45:32
I don't see anyone who calls %ToIndex. Why was the
bakkot
2016/06/28 23:41:07
Removed.
| |
| 888 | 894 |
| 889 RUNTIME_FUNCTION(Runtime_ToString) { | 895 RUNTIME_FUNCTION(Runtime_ToString) { |
| 890 HandleScope scope(isolate); | 896 HandleScope scope(isolate); |
| 891 DCHECK_EQ(1, args.length()); | 897 DCHECK_EQ(1, args.length()); |
| 892 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); | 898 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); |
| 893 RETURN_RESULT_OR_FAILURE(isolate, Object::ToString(isolate, input)); | 899 RETURN_RESULT_OR_FAILURE(isolate, Object::ToString(isolate, input)); |
| 894 } | 900 } |
| 895 | 901 |
| 896 | 902 |
| 897 RUNTIME_FUNCTION(Runtime_ToName) { | 903 RUNTIME_FUNCTION(Runtime_ToName) { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 990 isolate, o, key, &success, LookupIterator::OWN); | 996 isolate, o, key, &success, LookupIterator::OWN); |
| 991 if (!success) return isolate->heap()->exception(); | 997 if (!success) return isolate->heap()->exception(); |
| 992 MAYBE_RETURN( | 998 MAYBE_RETURN( |
| 993 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), | 999 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), |
| 994 isolate->heap()->exception()); | 1000 isolate->heap()->exception()); |
| 995 return *value; | 1001 return *value; |
| 996 } | 1002 } |
| 997 | 1003 |
| 998 } // namespace internal | 1004 } // namespace internal |
| 999 } // namespace v8 | 1005 } // namespace v8 |
| OLD | NEW |