Index: src/builtins/builtins-iterator.cc |
diff --git a/src/builtins/builtins-iterator.cc b/src/builtins/builtins-iterator.cc |
index b24073ac78bd4f52aa14c2904a10f4363d11953c..a986ec5bca173fd11d5f3656cd9379a53316c10c 100644 |
--- a/src/builtins/builtins-iterator.cc |
+++ b/src/builtins/builtins-iterator.cc |
@@ -16,55 +16,5 @@ void Builtins::Generate_IteratorPrototypeIterator( |
assembler.Return(assembler.Parameter(0)); |
} |
-BUILTIN(ModuleNamespaceIterator) { |
- HandleScope scope(isolate); |
- DCHECK_EQ(1, args.length()); |
- Handle<Object> receiver = args.at<Object>(0); |
- |
- if (!receiver->IsJSModuleNamespace()) { |
- THROW_NEW_ERROR_RETURN_FAILURE( |
- isolate, NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, |
- isolate->factory()->iterator_symbol(), receiver)); |
- } |
- auto ns = Handle<JSModuleNamespace>::cast(receiver); |
- |
- Handle<FixedArray> names = |
- KeyAccumulator::GetKeys(ns, KeyCollectionMode::kOwnOnly, SKIP_SYMBOLS) |
- .ToHandleChecked(); |
- return *isolate->factory()->NewJSFixedArrayIterator(names); |
-} |
- |
-BUILTIN(FixedArrayIteratorNext) { |
- HandleScope scope(isolate); |
- DCHECK_EQ(1, args.length()); |
- Handle<Object> receiver = args.at<Object>(0); |
- |
- // It is an error if this function is called on anything other than the |
- // particular iterator object for which the function was created. |
- if (!receiver->IsJSFixedArrayIterator() || |
- Handle<JSFixedArrayIterator>::cast(receiver)->initial_next() != |
- *args.target()) { |
- THROW_NEW_ERROR_RETURN_FAILURE( |
- isolate, NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, |
- isolate->factory()->next_string(), receiver)); |
- } |
- |
- auto iterator = Handle<JSFixedArrayIterator>::cast(receiver); |
- Handle<Object> value; |
- bool done; |
- |
- int index = iterator->index(); |
- if (index < iterator->array()->length()) { |
- value = handle(iterator->array()->get(index), isolate); |
- done = false; |
- iterator->set_index(index + 1); |
- } else { |
- value = isolate->factory()->undefined_value(); |
- done = true; |
- } |
- |
- return *isolate->factory()->NewJSIteratorResult(value, done); |
-} |
- |
} // namespace internal |
} // namespace v8 |