[compiler] Deprecate CompilationInfo::has_context predicate.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35348}
This commit is contained in:
mstarzinger 2016-04-08 01:28:57 -07:00 committed by Commit bot
parent 03975befe3
commit 03c169f957
3 changed files with 3 additions and 9 deletions

View File

@ -60,7 +60,8 @@ PARSE_INFO_GETTER_WITH_DEFAULT(LanguageMode, language_mode, STRICT)
PARSE_INFO_GETTER_WITH_DEFAULT(Handle<JSFunction>, closure,
Handle<JSFunction>::null())
PARSE_INFO_GETTER_WITH_DEFAULT(Scope*, scope, nullptr)
PARSE_INFO_GETTER(Handle<Context>, context)
PARSE_INFO_GETTER_WITH_DEFAULT(Handle<Context>, context,
Handle<Context>::null())
PARSE_INFO_GETTER(Handle<SharedFunctionInfo>, 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()) {

View File

@ -184,7 +184,6 @@ class CompilationInfo {
Handle<Context> context() const;
Handle<SharedFunctionInfo> shared_info() const;
bool has_shared_info() const;
bool has_context() const;
// -----------------------------------------------------------
Isolate* isolate() const {

View File

@ -274,8 +274,7 @@ void CodeGenerator::RecordSafepoint(ReferenceMap* references,
bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> 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())) {