Unify decoding of deoptimization translations.
authorjarin <jarin@chromium.org>
Mon, 8 Jun 2015 10:04:51 +0000 (03:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 8 Jun 2015 10:04:56 +0000 (10:04 +0000)
commit9127d4eef4248c6a5266c6ed9e9a32a4ce2423eb
tree10729f6d4496a3fc75fd65f4b936a9c4e4f0bc46
parentbd32a9f711cb14c2b7c34512d43e78bd24960124
Unify decoding of deoptimization translations.

This unifies methods Deoptimizer::DoTranslateCommand, Deotpimizer::DoTranslateObject and the arguments object materializer.

To unify these, we have to separate reading of the input frame from writing to the output frame because the argument materializer does not write to output frames.

Instead, we now deoptimize in following stages:

1. Read out the input frame/registers, decode them using the translations from the deoptimizer and store them in the deoptimizer (Deoptimizer::translated_state_). This is done in TranslatedState::Init.

2. Write out into the output frame buffer all the values that do not require allocation. We also remember references to the values that require materialization. As before, this is done in Deoptimizer::DoCompute*Frame method, but instead calling to DoTranslateCommand, we use the translated frame to obtain the values and write them to the output frames.

3. The platform specific code then sets up the output frames and calls into the deoptimization notification. This has not been changed at all.

4. Once the stack is setup, we handlify all the references in the saved translated values (TranslatedState::Prepare).

5. Finally, we materialize all the values we remembered in step (1) and write them to their frames on the stack (using the TranslatedValue::GetValue method).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28826}
12 files changed:
src/accessors.cc
src/arm/lithium-codegen-arm.cc
src/arm64/lithium-codegen-arm64.cc
src/deoptimizer.cc
src/deoptimizer.h
src/ia32/lithium-codegen-ia32.cc
src/mips/lithium-codegen-mips.cc
src/mips64/lithium-codegen-mips64.cc
src/ppc/lithium-codegen-ppc.cc
src/runtime/runtime-function.cc
src/x64/lithium-codegen-x64.cc
src/x87/lithium-codegen-x87.cc