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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3874 | 3874 |
3875 void Genesis::InitializeGlobal_icu_case_mapping() { | 3875 void Genesis::InitializeGlobal_icu_case_mapping() { |
3876 if (!FLAG_icu_case_mapping) return; | 3876 if (!FLAG_icu_case_mapping) return; |
3877 | 3877 |
3878 Handle<JSReceiver> exports_container( | 3878 Handle<JSReceiver> exports_container( |
3879 JSReceiver::cast(native_context()->exports_container())); | 3879 JSReceiver::cast(native_context()->exports_container())); |
3880 | 3880 |
3881 Handle<JSObject> string_prototype( | 3881 Handle<JSObject> string_prototype( |
3882 JSObject::cast(native_context()->string_function()->prototype())); | 3882 JSObject::cast(native_context()->string_function()->prototype())); |
3883 | 3883 |
3884 Handle<JSFunction> to_lower_case = Handle<JSFunction>::cast( | 3884 { |
3885 JSReceiver::GetProperty( | 3885 Handle<String> name = factory()->InternalizeUtf8String("toLowerCase"); |
3886 exports_container, | 3886 SetFunction(string_prototype, |
3887 factory()->InternalizeUtf8String("ToLowerCaseI18N")) | 3887 SimpleCreateFunction(isolate(), name, |
3888 .ToHandleChecked()); | 3888 Builtins::kStringPrototypeToLowerCaseI18N, |
3889 SetFunction(string_prototype, to_lower_case, | 3889 0, false), |
3890 factory()->InternalizeUtf8String("toLowerCase")); | 3890 name); |
3891 | 3891 } |
3892 Handle<JSFunction> to_upper_case = Handle<JSFunction>::cast( | 3892 { |
3893 JSReceiver::GetProperty( | 3893 Handle<String> name = factory()->InternalizeUtf8String("toUpperCase"); |
3894 exports_container, | 3894 SetFunction(string_prototype, |
3895 factory()->InternalizeUtf8String("ToUpperCaseI18N")) | 3895 SimpleCreateFunction(isolate(), name, |
3896 .ToHandleChecked()); | 3896 Builtins::kStringPrototypeToUpperCaseI18N, |
3897 SetFunction(string_prototype, to_upper_case, | 3897 0, false), |
3898 factory()->InternalizeUtf8String("toUpperCase")); | 3898 name); |
| 3899 } |
3899 | 3900 |
3900 Handle<JSFunction> to_locale_lower_case = Handle<JSFunction>::cast( | 3901 Handle<JSFunction> to_locale_lower_case = Handle<JSFunction>::cast( |
3901 JSReceiver::GetProperty( | 3902 JSReceiver::GetProperty( |
3902 exports_container, | 3903 exports_container, |
3903 factory()->InternalizeUtf8String("ToLocaleLowerCaseI18N")) | 3904 factory()->InternalizeUtf8String("ToLocaleLowerCaseI18N")) |
3904 .ToHandleChecked()); | 3905 .ToHandleChecked()); |
3905 SetFunction(string_prototype, to_locale_lower_case, | 3906 SetFunction(string_prototype, to_locale_lower_case, |
3906 factory()->InternalizeUtf8String("toLocaleLowerCase")); | 3907 factory()->InternalizeUtf8String("toLocaleLowerCase")); |
3907 | 3908 |
3908 Handle<JSFunction> to_locale_upper_case = Handle<JSFunction>::cast( | 3909 Handle<JSFunction> to_locale_upper_case = Handle<JSFunction>::cast( |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5059 } | 5060 } |
5060 | 5061 |
5061 | 5062 |
5062 // Called when the top-level V8 mutex is destroyed. | 5063 // Called when the top-level V8 mutex is destroyed. |
5063 void Bootstrapper::FreeThreadResources() { | 5064 void Bootstrapper::FreeThreadResources() { |
5064 DCHECK(!IsActive()); | 5065 DCHECK(!IsActive()); |
5065 } | 5066 } |
5066 | 5067 |
5067 } // namespace internal | 5068 } // namespace internal |
5068 } // namespace v8 | 5069 } // namespace v8 |
OLD | NEW |