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

Unified Diff: src/js/string.js

Issue 2232063002: [builtins] WIP: Array indexOf in TurboFan/Runtime (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move fast path FastElements -> FastSmiOrObjectElements Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/i18n.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/string.js
diff --git a/src/js/string.js b/src/js/string.js
index 1472c9fe401b2914db07e8546b80429c0c31479a..38caab7b125d1adbe25957d474250faa46eb6f59 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -9,7 +9,6 @@
// -------------------------------------------------------------------
// Imports
-var ArrayIndexOf;
var ArrayJoin;
var GlobalRegExp = global.RegExp;
var GlobalString = global.String;
@@ -23,7 +22,6 @@ var searchSymbol = utils.ImportNow("search_symbol");
var splitSymbol = utils.ImportNow("split_symbol");
utils.Import(function(from) {
- ArrayIndexOf = from.ArrayIndexOf;
ArrayJoin = from.ArrayJoin;
IsRegExp = from.IsRegExp;
MaxSimple = from.MaxSimple;
@@ -132,7 +130,7 @@ function StringNormalize(formArg) { // length == 0
var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING(formArg);
var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD'];
- var normalizationForm = %_Call(ArrayIndexOf, NORMALIZATION_FORMS, form);
+ var normalizationForm = %ArrayIndexOf(NORMALIZATION_FORMS, form, 0);
if (normalizationForm === -1) {
throw %make_range_error(kNormalizationForm,
%_Call(ArrayJoin, NORMALIZATION_FORMS, ', '));
« no previous file with comments | « src/js/i18n.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698