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

Unified Diff: src/string-iterator.js

Issue 1154743003: Revert of Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/string.js ('k') | src/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-iterator.js
diff --git a/src/string-iterator.js b/src/string-iterator.js
index 536430ee8f6a06ab4d3b54cb7e3c37a42e0ddeb6..d6cf95e7d9f2dcc058f808298f7cbf6bee9e837b 100644
--- a/src/string-iterator.js
+++ b/src/string-iterator.js
@@ -8,18 +8,9 @@
%CheckIsBootstrapping();
-// -------------------------------------------------------------------
-// Imports
-
var GlobalString = global.String;
-var ArrayIteratorCreateResultObject;
-
-utils.Import(function(from) {
- ArrayIteratorCreateResultObject = from.ArrayIteratorCreateResultObject;
-});
-
-// -------------------------------------------------------------------
+//-------------------------------------------------------------------
var stringIteratorIteratedStringSymbol =
GLOBAL_PRIVATE("StringIterator#iteratedString");
@@ -50,7 +41,7 @@
var s = GET_PRIVATE(iterator, stringIteratorIteratedStringSymbol);
if (IS_UNDEFINED(s)) {
- return ArrayIteratorCreateResultObject(UNDEFINED, true);
+ return $iteratorCreateResultObject(UNDEFINED, true);
}
var position = GET_PRIVATE(iterator, stringIteratorNextIndexSymbol);
@@ -59,7 +50,7 @@
if (position >= length) {
SET_PRIVATE(iterator, stringIteratorIteratedStringSymbol,
UNDEFINED);
- return ArrayIteratorCreateResultObject(UNDEFINED, true);
+ return $iteratorCreateResultObject(UNDEFINED, true);
}
var first = %_StringCharCodeAt(s, position);
@@ -76,7 +67,7 @@
SET_PRIVATE(iterator, stringIteratorNextIndexSymbol, position);
- return ArrayIteratorCreateResultObject(resultString, false);
+ return $iteratorCreateResultObject(resultString, false);
}
@@ -90,13 +81,13 @@
%FunctionSetPrototype(StringIterator, {__proto__: $iteratorPrototype});
%FunctionSetInstanceClassName(StringIterator, 'String Iterator');
-utils.InstallFunctions(StringIterator.prototype, DONT_ENUM, [
+$installFunctions(StringIterator.prototype, DONT_ENUM, [
'next', StringIteratorNext
]);
%AddNamedProperty(StringIterator.prototype, symbolToStringTag,
"String Iterator", READ_ONLY | DONT_ENUM);
-utils.SetFunctionName(StringPrototypeIterator, symbolIterator);
+$setFunctionName(StringPrototypeIterator, symbolIterator);
%AddNamedProperty(GlobalString.prototype, symbolIterator,
StringPrototypeIterator, DONT_ENUM);
« no previous file with comments | « src/string.js ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698