From 56f9cca8f1cc6ccb522ee8dafd3874d3b6082a66 Mon Sep 17 00:00:00 2001 From: svenpanne Date: Mon, 16 Feb 2015 03:04:22 -0800 Subject: [PATCH] Get code flags from compilation info. Removed useless (and in the future incorrect) DCHECKs on the way. Review URL: https://codereview.chromium.org/921443004 Cr-Commit-Position: refs/heads/master@{#26655} --- src/compiler/code-generator.cc | 7 +------ src/objects-inl.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc index 95b311d..1a4566d 100644 --- a/src/compiler/code-generator.cc +++ b/src/compiler/code-generator.cc @@ -125,13 +125,8 @@ Handle CodeGenerator::GenerateCode() { safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); - // TODO(titzer): what are the right code flags here? - Code::Kind kind = Code::STUB; - if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { - kind = Code::OPTIMIZED_FUNCTION; - } Handle result = v8::internal::CodeGenerator::MakeCodeEpilogue( - masm(), Code::ComputeFlags(kind), info); + masm(), info->flags(), info); result->set_is_turbofanned(true); result->set_stack_slots(frame()->GetSpillSlotCount()); result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); diff --git a/src/objects-inl.h b/src/objects-inl.h index 2dc7eb0..6c504fb 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -4869,14 +4869,12 @@ inline void Code::set_is_crankshafted(bool value) { inline bool Code::is_turbofanned() { - DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB); return IsTurbofannedField::decode( READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); } inline void Code::set_is_turbofanned(bool value) { - DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB); int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); int updated = IsTurbofannedField::update(previous, value); WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); -- 2.7.4