Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 9d6a72cad923d4348e2ca7b890e8f835fd7a7a09..793034c1e2232b4b364c4ee16f86c56fd5903084 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -1867,29 +1867,19 @@ void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode( |
HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt()); |
HValue* context_slot = LoadFromOptimizedCodeMap( |
optimized_map, map_index, SharedFunctionInfo::kContextOffset); |
- context_slot = Add<HLoadNamedField>(context_slot, nullptr, |
- HObjectAccess::ForWeakCellValue()); |
HValue* osr_ast_slot = LoadFromOptimizedCodeMap( |
optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset); |
HValue* code_object = LoadFromOptimizedCodeMap( |
optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset); |
- code_object = Add<HLoadNamedField>(code_object, nullptr, |
- HObjectAccess::ForWeakCellValue()); |
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()->GetConstant0()); |
+ graph()->GetConstantUndefined()); |
builder->Then(); |
HValue* literals = LoadFromOptimizedCodeMap(optimized_map, |
map_index, SharedFunctionInfo::kLiteralsOffset); |
- literals = Add<HLoadNamedField>(literals, nullptr, |
- HObjectAccess::ForWeakCellValue()); |
- IfBuilder maybe_deopt(this); |
- maybe_deopt.If<HCompareObjectEqAndBranch>(literals, graph()->GetConstant0()); |
- maybe_deopt.ThenDeopt(Deoptimizer::kLiteralsWereDisposed); |
- maybe_deopt.End(); |
BuildInstallOptimizedCode(js_function, native_context, code_object, literals); |
@@ -2013,10 +2003,8 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( |
HValue* shared_code = |
Add<HLoadNamedField>(optimized_map, nullptr, |
HObjectAccess::ForOptimizedCodeMapSharedCode()); |
- shared_code = Add<HLoadNamedField>(shared_code, nullptr, |
- HObjectAccess::ForWeakCellValue()); |
shared_code_check.IfNot<HCompareObjectEqAndBranch>( |
- shared_code, graph()->GetConstant0()); |
+ shared_code, graph()->GetConstantUndefined()); |
shared_code_check.Then(); |
{ |
// Store the context-independent optimized code. |