Commit 56f9cca8 authored by svenpanne's avatar svenpanne Committed by Commit bot

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}
parent acd6715d
......@@ -125,13 +125,8 @@ Handle<Code> 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<Code> 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());
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment