• jarin's avatar
    Unify decoding of deoptimization translations. · 9127d4ee
    jarin authored
    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}
    9127d4ee
runtime-function.cc 20.4 KB