 Chromium Code Reviews
 Chromium Code Reviews Issue 2728763006:
  Migrate some case conversion functions from JS to CPP builtins  (Closed)
    
  
    Issue 2728763006:
  Migrate some case conversion functions from JS to CPP builtins  (Closed) 
  | Index: src/builtins/builtins-intl.cc | 
| diff --git a/src/builtins/builtins-intl.cc b/src/builtins/builtins-intl.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..96a1e5d8def1212c61d9837f3fb652e8e9641b0e | 
| --- /dev/null | 
| +++ b/src/builtins/builtins-intl.cc | 
| @@ -0,0 +1,32 @@ | 
| +// Copyright 2017 the V8 project authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifdef V8_I18N_SUPPORT | 
| + | 
| +#include "src/builtins/builtins-utils.h" | 
| +#include "src/builtins/builtins.h" | 
| +#include "src/code-stub-assembler.h" | 
| 
Jakob Kummerow
2017/03/18 12:27:32
This doesn't need the CodeStubAssembler. However,
 | 
| +#include "src/i18n.h" | 
| + | 
| +namespace v8 { | 
| +namespace internal { | 
| + | 
| +BUILTIN(StringPrototypeToLowerCaseI18N) { | 
| + HandleScope scope(isolate); | 
| + TO_THIS_STRING(string, "String.prototype.toLowerCase"); | 
| + string = String::Flatten(string); | 
| + return ConvertCase(string, false, isolate); | 
| +} | 
| + | 
| +BUILTIN(StringPrototypeToUpperCaseI18N) { | 
| + HandleScope scope(isolate); | 
| + TO_THIS_STRING(string, "String.prototype.toUpperCase"); | 
| + string = String::Flatten(string); | 
| + return ConvertCase(string, true, isolate); | 
| +} | 
| + | 
| +} // namespace internal | 
| +} // namespace v8 | 
| + | 
| +#endif // V8_I18N_SUPPORT |