diff --git a/src/compiler.cc b/src/compiler.cc index d397382150..2f68749521 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -60,7 +60,8 @@ PARSE_INFO_GETTER_WITH_DEFAULT(LanguageMode, language_mode, STRICT) PARSE_INFO_GETTER_WITH_DEFAULT(Handle, closure, Handle::null()) PARSE_INFO_GETTER_WITH_DEFAULT(Scope*, scope, nullptr) -PARSE_INFO_GETTER(Handle, context) +PARSE_INFO_GETTER_WITH_DEFAULT(Handle, context, + Handle::null()) PARSE_INFO_GETTER(Handle, shared_info) #undef PARSE_INFO_GETTER @@ -110,11 +111,6 @@ bool CompilationInfo::has_shared_info() const { } -bool CompilationInfo::has_context() const { - return parse_info_ && !parse_info_->context().is_null(); -} - - CompilationInfo::CompilationInfo(ParseInfo* parse_info) : CompilationInfo(parse_info, nullptr, Code::ComputeFlags(Code::FUNCTION), BASE, parse_info->isolate(), parse_info->zone()) { diff --git a/src/compiler.h b/src/compiler.h index 2fcd01aa90..eb37cd8c1d 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -184,7 +184,6 @@ class CompilationInfo { Handle context() const; Handle shared_info() const; bool has_shared_info() const; - bool has_context() const; // ----------------------------------------------------------- Isolate* isolate() const { diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc index 086da560e4..0773ae0810 100644 --- a/src/compiler/code-generator.cc +++ b/src/compiler/code-generator.cc @@ -274,8 +274,7 @@ void CodeGenerator::RecordSafepoint(ReferenceMap* references, bool CodeGenerator::IsMaterializableFromFrame(Handle object, int* slot_return) { if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { - if (info()->has_context() && object.is_identical_to(info()->context()) && - !info()->is_osr()) { + if (object.is_identical_to(info()->context()) && !info()->is_osr()) { *slot_return = Frame::kContextSlot; return true; } else if (object.is_identical_to(info()->closure())) {