Commit 1bebc590 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Use 0 instead of undefined for uninitialized stub key.

The CPU profiler looks at uninitialized code objects, which triggers an assertion.

TBR=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a5449405
......@@ -1437,7 +1437,7 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
code->set_raw_kind_specific_flags2(0);
code->set_is_crankshafted(crankshafted);
code->set_deoptimization_data(*empty_fixed_array(), SKIP_WRITE_BARRIER);
code->set_raw_type_feedback_info(*undefined_value());
code->set_raw_type_feedback_info(Smi::FromInt(0));
code->set_next_code_link(*undefined_value());
code->set_handler_table(*empty_fixed_array(), SKIP_WRITE_BARRIER);
code->set_prologue_offset(prologue_offset);
......
......@@ -639,7 +639,7 @@ void Code::CodeVerify() {
last_gc_pc = it.rinfo()->pc();
}
}
CHECK(raw_type_feedback_info()->IsUndefined() ||
CHECK(raw_type_feedback_info() == Smi::FromInt(0) ||
raw_type_feedback_info()->IsSmi() == IsCodeStubOrIC());
}
......
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