Reviewers: Igor Sheludko,

Description:
[runtime] Introduce a dedicated JSIteratorResult type.

Use a single JSIteratorResult type for all implementation provided
iterator results (i.e. the String, Array and collection iterators,
and also for generators).  This removes one source of unnecessary
polymorphism in for-of loops.  It is accomplished by a new intrinsic
%_CreateIterResultObject() that should be used to create iterator
result objects from JavaScript builtins (there's a matching factory
method for C++ code).

Also restructure the %StringIteratorPrototype%.next() and
%ArrayIteratorPrototype%.next() functions to be a bit more friendly
to optimizing compilers.

[email protected]

Please review this at https://codereview.chromium.org/1302173007/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+494, -262 lines):
  M src/array-iterator.js
  M src/bootstrapper.cc
  M src/collection-iterator.js
  M src/contexts.h
  M src/factory.h
  M src/factory.cc
  M src/full-codegen/arm/full-codegen-arm.cc
  M src/full-codegen/arm64/full-codegen-arm64.cc
  M src/full-codegen/full-codegen.h
  M src/full-codegen/ia32/full-codegen-ia32.cc
  M src/full-codegen/mips/full-codegen-mips.cc
  M src/full-codegen/mips64/full-codegen-mips64.cc
  M src/full-codegen/x64/full-codegen-x64.cc
  M src/heap/objects-visiting.cc
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/objects.h
  M src/objects-debug.cc
  M src/objects-inl.h
  M src/objects-printer.cc
  M src/runtime/runtime.h
  M src/runtime/runtime-object.cc
  M src/string-iterator.js
  M src/x64/macro-assembler-x64.h


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to