Add Array support for @@species and subclassing

This patch implements @@species, guarded behind the --harmony-species
flag, on Arrays. Methods which return an Array will instead return
the appropriate instance based on the ArraySpeciesCreate algorithm.
The algorithm is implemented in C++ to get access to realm information
and to implement some Array methods in C++, but it is also accessed
from JavaScript through a new runtime function. A couple interactive
Octane runs show no performance regression with the flag turned off,
but turning --harmony-species on will surely have a significant
regression, as Array methods now heavily use ObjectDefineProperty.

BUG=v8:4093
LOG=Y
R=adamk,cbruni

Review URL: https://codereview.chromium.org/1560763002

Cr-Commit-Position: refs/heads/master@{#33144}
11 files changed
tree: 4102f92df6687f6fbdb7b571acbc020f227c0b58
  1. .clang-format
  2. .gitignore
  3. .ycm_extra_conf.py
  4. AUTHORS
  5. BUILD.gn
  6. ChangeLog
  7. DEPS
  8. LICENSE
  9. LICENSE.strongtalk
  10. LICENSE.v8
  11. LICENSE.valgrind
  12. Makefile
  13. Makefile.android
  14. Makefile.nacl
  15. OWNERS
  16. PRESUBMIT.py
  17. README.md
  18. WATCHLISTS
  19. benchmarks/
  20. build/
  21. codereview.settings
  22. docs/
  23. include/
  24. infra/
  25. samples/
  26. snapshot_toolchain.gni
  27. src/
  28. test/
  29. testing/
  30. third_party/
  31. tools/
README.md

V8 JavaScript Engine

V8 is Google's open source JavaScript engine.

V8 implements ECMAScript as specified in ECMA-262.

V8 is written in C++ and is used in Google Chrome, the open source browser from Google.

V8 can run standalone, or can be embedded into any C++ application.

V8 Project page: https://github.com/v8/v8/wiki

Getting the Code

Checkout depot tools, and run

    fetch v8

This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run

    git pull origin
    gclient sync

For fetching all branches, add the following into your remote configuration in .git/config:

    fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
    fetch = +refs/tags/*:refs/tags/*

Contributing

Please follow the instructions mentioned on the V8 wiki.