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); |