[turbofan] Use the SharedInfo only if we have it in the code generator.
authortitzer <titzer@chromium.org>
Fri, 28 Aug 2015 13:17:07 +0000 (06:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 28 Aug 2015 13:17:20 +0000 (13:17 +0000)
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30445}

src/compiler/code-generator.cc

index 12746b8..91602a0 100644 (file)
@@ -359,11 +359,8 @@ void CodeGenerator::PopulateDeoptimizationData(Handle<Code> code_object) {
   data->SetInlinedFunctionCount(
       Smi::FromInt(static_cast<int>(inlined_function_count_)));
   data->SetOptimizationId(Smi::FromInt(info->optimization_id()));
-  // TODO(jarin) The following code was copied over from Lithium, not sure
-  // whether the scope or the IsOptimizing condition are really needed.
-  if (info->IsOptimizing()) {
-    // Reference to shared function info does not change between phases.
-    AllowDeferredHandleDereference allow_handle_dereference;
+
+  if (info->has_shared_info()) {
     data->SetSharedFunctionInfo(*info->shared_info());
   } else {
     data->SetSharedFunctionInfo(Smi::FromInt(0));