Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 9f9b14e309d975f15c77020d72a6e38b8e3e0a28..e9b72ff9cbfdd5c3926feff39cced9a51d245ebe 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -1667,13 +1667,15 @@ void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode( |
optimized_map, map_index, SharedFunctionInfo::kContextOffset); |
HValue* osr_ast_slot = LoadFromOptimizedCodeMap( |
optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset); |
+ HValue* code_object = LoadFromOptimizedCodeMap( |
+ optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset); |
builder->If<HCompareObjectEqAndBranch>(native_context, |
context_slot); |
builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none); |
+ builder->And(); |
+ builder->IfNot<HCompareObjectEqAndBranch>(code_object, |
+ graph()->GetConstantUndefined()); |
builder->Then(); |
- HValue* code_object = LoadFromOptimizedCodeMap(optimized_map, |
- map_index, SharedFunctionInfo::kCachedCodeOffset); |
- // and the literals |
HValue* literals = LoadFromOptimizedCodeMap(optimized_map, |
map_index, SharedFunctionInfo::kLiteralsOffset); |