| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 13881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13892 NONE)); | 13892 NONE)); |
| 13893 output->set(i, *result); | 13893 output->set(i, *result); |
| 13894 } | 13894 } |
| 13895 | 13895 |
| 13896 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(output); | 13896 Handle<JSArray> result = isolate->factory()->NewJSArrayWithElements(output); |
| 13897 result->set_length(Smi::FromInt(length)); | 13897 result->set_length(Smi::FromInt(length)); |
| 13898 return *result; | 13898 return *result; |
| 13899 } | 13899 } |
| 13900 | 13900 |
| 13901 | 13901 |
| 13902 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsInitializedIntlObject) { | |
| 13903 HandleScope scope(isolate); | |
| 13904 | |
| 13905 ASSERT(args.length() == 1); | |
| 13906 | |
| 13907 CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0); | |
| 13908 | |
| 13909 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); | |
| 13910 Handle<Object> tag(input->GetHiddenProperty(*marker), isolate); | |
| 13911 return isolate->heap()->ToBoolean(!tag->IsTheHole()); | |
| 13912 } | |
| 13913 | |
| 13914 | |
| 13915 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsInitializedIntlObjectOfType) { | |
| 13916 HandleScope scope(isolate); | |
| 13917 | |
| 13918 ASSERT(args.length() == 2); | |
| 13919 | |
| 13920 CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0); | |
| 13921 CONVERT_ARG_HANDLE_CHECKED(String, expected_type, 1); | |
| 13922 | |
| 13923 | |
| 13924 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); | |
| 13925 Handle<Object> tag(input->GetHiddenProperty(*marker), isolate); | |
| 13926 return isolate->heap()->ToBoolean( | |
| 13927 tag->IsString() && String::cast(*tag)->Equals(*expected_type)); | |
| 13928 } | |
| 13929 | |
| 13930 | |
| 13931 RUNTIME_FUNCTION(MaybeObject*, Runtime_MarkAsInitializedIntlObjectOfType) { | |
| 13932 HandleScope scope(isolate); | |
| 13933 | |
| 13934 ASSERT(args.length() == 3); | |
| 13935 | |
| 13936 CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0); | |
| 13937 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); | |
| 13938 CONVERT_ARG_HANDLE_CHECKED(JSObject, impl, 2); | |
| 13939 | |
| 13940 Handle<String> marker = isolate->factory()->intl_initialized_marker_string(); | |
| 13941 JSObject::SetHiddenProperty(input, marker, type); | |
| 13942 | |
| 13943 marker = isolate->factory()->intl_impl_object_string(); | |
| 13944 JSObject::SetHiddenProperty(input, marker, impl); | |
| 13945 | |
| 13946 return isolate->heap()->undefined_value(); | |
| 13947 } | |
| 13948 | |
| 13949 | |
| 13950 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetImplFromInitializedIntlObject) { | |
| 13951 HandleScope scope(isolate); | |
| 13952 | |
| 13953 ASSERT(args.length() == 1); | |
| 13954 | |
| 13955 CONVERT_ARG_HANDLE_CHECKED(JSObject, input, 0); | |
| 13956 | |
| 13957 Handle<String> marker = isolate->factory()->intl_impl_object_string(); | |
| 13958 Handle<Object> impl(input->GetHiddenProperty(*marker), isolate); | |
| 13959 if (impl->IsTheHole()) return isolate->heap()->undefined_value(); | |
| 13960 return *impl; | |
| 13961 } | |
| 13962 | |
| 13963 | |
| 13964 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateDateTimeFormat) { | 13902 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateDateTimeFormat) { |
| 13965 HandleScope scope(isolate); | 13903 HandleScope scope(isolate); |
| 13966 | 13904 |
| 13967 ASSERT(args.length() == 3); | 13905 ASSERT(args.length() == 3); |
| 13968 | 13906 |
| 13969 CONVERT_ARG_HANDLE_CHECKED(String, locale, 0); | 13907 CONVERT_ARG_HANDLE_CHECKED(String, locale, 0); |
| 13970 CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1); | 13908 CONVERT_ARG_HANDLE_CHECKED(JSObject, options, 1); |
| 13971 CONVERT_ARG_HANDLE_CHECKED(JSObject, resolved, 2); | 13909 CONVERT_ARG_HANDLE_CHECKED(JSObject, resolved, 2); |
| 13972 | 13910 |
| 13973 Handle<ObjectTemplateInfo> date_format_template = | 13911 Handle<ObjectTemplateInfo> date_format_template = |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15212 } | 15150 } |
| 15213 } | 15151 } |
| 15214 | 15152 |
| 15215 | 15153 |
| 15216 void Runtime::OutOfMemory() { | 15154 void Runtime::OutOfMemory() { |
| 15217 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); | 15155 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); |
| 15218 UNREACHABLE(); | 15156 UNREACHABLE(); |
| 15219 } | 15157 } |
| 15220 | 15158 |
| 15221 } } // namespace v8::internal | 15159 } } // namespace v8::internal |
| OLD | NEW |