• Yang Guo's avatar
    Revert "[Compiler] Ensure unoptimized code generation is context independent." · 886cd71e
    Yang Guo authored
    This reverts commit 38cd61d0.
    
    Reason for revert: Layout test http/tests/asmjs/asm-warnings.html fails due to missing context.
    
    See https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/238991
    
    
    crash log for renderer (pid <unknown>):
    STDOUT: <empty>
    STDERR: [1:1:1123/024436.020348:FATAL:script_state.h(140)] Check failed: !context.IsEmpty(). 
    STDERR: #0 0x5556817298df base::debug::StackTrace::StackTrace()
    STDERR: #1 0x55568167b5fb logging::LogMessage::~LogMessage()
    STDERR: #2 0x55568154ed45 blink::ScriptState::From()
    STDERR: #3 0x555683047aa9 blink::V8Initializer::MessageHandlerInMainThread()
    STDERR: #4 0x5556801793c8 v8::internal::MessageHandler::ReportMessageNoExceptions()
    STDERR: #5 0x555680178652 v8::internal::MessageHandler::ReportMessage()
    STDERR: #6 0x5556802c2563 v8::internal::PendingCompilationErrorHandler::ReportWarnings()
    STDERR: #7 0x55567fc8bcd3 v8::internal::(anonymous namespace)::FinalizeUnoptimizedCode()
    STDERR: #8 0x55567fc8b668 v8::internal::Compiler::Compile()
    STDERR: #9 0x55567fc8be6b v8::internal::Compiler::Compile()
    STDERR: #10 0x55568033a36f v8::internal::__RT_impl_Runtime_CompileLazy()
    STDERR: #11 0x5556808f2492 <unknown>
    STDERR: 
    STDERR: [25209:25254:1123/024436.075700:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ...
    
    
    The issue seems to be that we do require the context for when we report a compile error when finalizing the compilation.
    
    Original change's description:
    > [Compiler] Ensure unoptimized code generation is context independent.
    > 
    > Now that Asm.js code is also context independent, move code to ensure context independence
    > from BytecodeGenerator to FinalizeUnoptimizedCode.
    > 
    > Change-Id: I7738eb3b347ea82764ecd3b5548dc82cb06d2f4e
    > Reviewed-on: https://chromium-review.googlesource.com/c/1347483
    > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#57730}
    
    TBR=rmcilroy@chromium.org,mstarzinger@chromium.org
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Change-Id: Iaa15e608b35a3396ba51a03f996c6de1330f0016
    Reviewed-on: https://chromium-review.googlesource.com/c/1349236
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57785}
    886cd71e
compiler.cc 81.4 KB