diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 507d041a39..465bf44578 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -4523,7 +4523,7 @@ HLoadNamedField* HGraphBuilder::BuildLoadNamedField(HValue* object, HInstruction* HGraphBuilder::BuildLoadNamedGeneric(HValue* obj, Property* expr) { - if (expr->IsUninitialized()) { + if (expr->IsUninitialized() && !FLAG_always_opt) { AddInstruction(new(zone()) HSoftDeoptimize); current_block()->MarkAsDeoptimizing(); } diff --git a/test/cctest/test-log-stack-tracer.cc b/test/cctest/test-log-stack-tracer.cc index 8b2348cd5b..6847ef7eea 100644 --- a/test/cctest/test-log-stack-tracer.cc +++ b/test/cctest/test-log-stack-tracer.cc @@ -277,9 +277,7 @@ static void CreateTraceCallerFunction(const char* func_name, TEST(CFromJSStackTrace) { // BUG(1303) Inlining of JSFuncDoTrace() in JSTrace below breaks this test. i::FLAG_use_inlining = false; - // This test does not work with --always-opt because we don't replace the code - // in the JSFunction at deoptimization in that case. - i::FLAG_always_opt = false; + TickSample sample; InitTraceEnv(&sample);