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}
This commit is contained in:
svenpanne 2015-02-16 03:04:22 -08:00 committed by Commit bot
parent acd6715dd9
commit 56f9cca8f1
2 changed files with 1 additions and 8 deletions

View File

@ -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());

View File

@ -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);