Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/i18n.js

Issue 1323543002: [runtime] Replace %to_string_fun with %_ToString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ToStringStub
Patch Set: REBASE. Fixes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/harmony-regexp.js ('k') | src/json.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 // ECMAScript 402 API implementation. 5 // ECMAScript 402 API implementation.
6 6
7 /** 7 /**
8 * Intl object is a single object that has some named properties, 8 * Intl object is a single object that has some named properties,
9 * all of which are constructors. 9 * all of which are constructors.
10 */ 10 */
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 * If the form is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw 1997 * If the form is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw
1998 * a RangeError Exception. 1998 * a RangeError Exception.
1999 */ 1999 */
2000 2000
2001 OverrideFunction(GlobalString.prototype, 'normalize', function() { 2001 OverrideFunction(GlobalString.prototype, 'normalize', function() {
2002 if (%_IsConstructCall()) { 2002 if (%_IsConstructCall()) {
2003 throw MakeTypeError(kOrdinaryFunctionCalledAsConstructor); 2003 throw MakeTypeError(kOrdinaryFunctionCalledAsConstructor);
2004 } 2004 }
2005 2005
2006 CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize"); 2006 CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize");
2007 var s = TO_STRING_INLINE(this); 2007 var s = TO_STRING(this);
2008 2008
2009 var formArg = %_Arguments(0); 2009 var formArg = %_Arguments(0);
2010 var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING_INLINE(formArg); 2010 var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING(formArg);
2011 2011
2012 var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD']; 2012 var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD'];
2013 2013
2014 var normalizationForm = 2014 var normalizationForm =
2015 %_CallFunction(NORMALIZATION_FORMS, form, ArrayIndexOf); 2015 %_CallFunction(NORMALIZATION_FORMS, form, ArrayIndexOf);
2016 if (normalizationForm === -1) { 2016 if (normalizationForm === -1) {
2017 throw MakeRangeError(kNormalizationForm, 2017 throw MakeRangeError(kNormalizationForm,
2018 %_CallFunction(NORMALIZATION_FORMS, ', ', ArrayJoin)); 2018 %_CallFunction(NORMALIZATION_FORMS, ', ', ArrayJoin));
2019 } 2019 }
2020 2020
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 } 2110 }
2111 2111
2112 var locales = %_Arguments(0); 2112 var locales = %_Arguments(0);
2113 var options = %_Arguments(1); 2113 var options = %_Arguments(1);
2114 return toLocaleDateTime( 2114 return toLocaleDateTime(
2115 this, locales, options, 'time', 'time', 'dateformattime'); 2115 this, locales, options, 'time', 'time', 'dateformattime');
2116 } 2116 }
2117 ); 2117 );
2118 2118
2119 }) 2119 })
OLDNEW
« no previous file with comments | « src/harmony-regexp.js ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698