Go to file
jarin@chromium.org 868ad01ecb This is a preview of the captured arguments object materialization,
mostly to make sure that it is going in the right direction. The current
version is passing all the existing test + a bunch of new tests
(packaged in the change list, too).

The patch extends the SlotRef object to describe captured and duplicated
objects. Since the SlotRefs are not independent of each other anymore,
there is a new SlotRefValueBuilder class that stores the SlotRefs and
later materializes the objects from the SlotRefs.

Note that unlike the previous implementation of SlotRefs, we now build
the SlotRef entries for the entire frame, not just the particular
function.  This is because duplicate objects might refer to previous
captured objects (that might live inside other inlined function's part
of the frame).

We also need to store the materialized objects between other potential
invocations of the same arguments object so that we materialize each
captured object at most once.  The materialized objects of frames live
in the new MaterielizedObjectStore object (contained in Isolate),
indexed by the frame's FP address.  Each argument materialization (and
deoptimization) tries to lookup its captured objects in the store before
building new ones.  Deoptimization also removes the materialized objects
from the store. We also schedule a lazy deopt to be sure that we always
get rid of the materialized objects and that the optmized function
adopts the materialized objects (instead of happily computing with its
captured representations).

Concerns:

- Is there a simpler/more correct way to store the already-materialized
objects? (At the moment there is a custom root reference to JSArray
containing frames' FixedArrays with their captured objects.)

- Is the FP address the right key for a frame? (Note that deoptimizer's
representation of frame is different from the argument object
materializer's one - it is not easy to find common ground.)

- Performance is suboptimal in several places, but a quick local run of
benchmarks does not seem to show a perf hit. Examples of possible
improvements: smarter generation of SlotRefs (build other functions'
SlotRefs only for captured objects and only if necessary), smarter
lookup of stored materialized objects.

- Ideally, we would like to share the code for argument materialization
with deoptimizer's materializer.  However, the supporting data structures
(mainly the frame descriptor) are quite different in each case, so it
looks more like a separate project.

Thanks for any feedback.

R=mstarzinger@chromium.org, danno@chromium.org
LOG=N
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:14:15 +00:00
benchmarks Fix bug in nextWeaker function of deltablue benchmark. 2013-10-25 13:21:46 +00:00
build Don't hardcode GCC_VERSION for Xcode in standalone.gypi. 2014-01-23 15:55:20 +00:00
include This is a preview of the captured arguments object materialization, 2014-01-29 15:14:15 +00:00
samples Prepare removal of ObjectTemplate::New without Isolate parameter. 2014-01-08 06:53:31 +00:00
src This is a preview of the captured arguments object materialization, 2014-01-29 15:14:15 +00:00
test This is a preview of the captured arguments object materialization, 2014-01-29 15:14:15 +00:00
tools Delete v8_shell target now that chrome uses d8 2014-01-24 14:58:40 +00:00
.clang-format Change clang-format config to allow for two empty lines between functions 2013-12-03 10:39:21 +00:00
.gitignore Migrate to new test status file syntax 2013-09-24 12:08:33 +00:00
AUTHORS Add support for the QNX operating system. 2014-01-02 07:04:05 +00:00
ChangeLog Prepare push to trunk. Now working on version 3.24.27. 2014-01-29 08:13:05 +00:00
codereview.settings Add settings for try server. 2013-12-17 12:24:25 +00:00
DEPS Roll gyp 1830:1831 2014-01-08 15:54:46 +00:00
LICENSE Update LICENSE file 2012-01-03 16:38:42 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Roll gyp 1830:1831 2014-01-08 15:54:46 +00:00
Makefile.android Fix standalone Android and NaCl Makefiles to support arm_version=7 and optdebug 2013-12-16 15:50:34 +00:00
Makefile.nacl Fix standalone Android and NaCl Makefiles to support arm_version=7 and optdebug 2013-12-16 15:50:34 +00:00
OWNERS Add jarin to OWNERS file. 2014-01-23 07:55:58 +00:00
PRESUBMIT.py Revert "Add debug output to presubmit script for investigating tree check behavior." and "Add more temporary debugging output to PRESUBMIT.py". 2014-01-10 15:17:49 +00:00
WATCHLISTS Add myself to a watchlist for the public API. 2013-10-10 11:37:48 +00:00