• leszeks's avatar
    abstract_code: return compiled code for compiled shared funcs · 679b31c2
    leszeks authored
    SharedFunctionInfo's abstract_code was returning the bytecode array
    whenever SharedFunctionInfo had a bytecode array, even if the function
    was compiled (e.g. tiered up to FCG). This meant that abstract_code
    could return code that is not actually the code that will run, which was
    causing problems in profiling as the sampled PC did not match the known
    code offset.
    
    This patch changes both SharedFunctionInfo and JSFunction to return the
    bytecode if-and-only-if they are not compiled and have a bytecode array
    to return, or they already point to the interpreter trampoline.
    
    BUG=v8:5758
    
    Review-Url: https://codereview.chromium.org/2592703002
    Cr-Commit-Position: refs/heads/master@{#41894}
    679b31c2
objects-inl.h 258 KB