Commit 9889994c authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fix function sorter from 11482 with correct fix. The sorter

was reverted from trunk 3.10.8.1, with this change we can
repush it.
Review URL: https://chromiumcodereview.appspot.com/10377043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 681f2951
......@@ -5713,7 +5713,7 @@ void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
if (expr->ComputeTarget(map, name)) {
order[ordered_functions++] =
FunctionSorter(i,
expr->target()->shared()->code()->profiler_ticks(),
expr->target()->shared()->profiler_ticks(),
InliningAstSize(expr->target()),
expr->target()->shared()->SourceSize());
}
......
......@@ -3082,7 +3082,6 @@ void Code::set_allow_osr_at_loop_nesting_level(int level) {
int Code::profiler_ticks() {
if (kind() == OPTIMIZED_FUNCTION) return 0;
ASSERT_EQ(FUNCTION, kind());
return READ_BYTE_FIELD(this, kProfilerTicksOffset);
}
......@@ -3673,6 +3672,12 @@ void SharedFunctionInfo::set_optimization_disabled(bool disable) {
}
int SharedFunctionInfo::profiler_ticks() {
if (code()->kind() != Code::FUNCTION) return 0;
return code()->profiler_ticks();
}
LanguageMode SharedFunctionInfo::language_mode() {
int hints = compiler_hints();
if (BooleanBit::get(hints, kExtendedModeFunction)) {
......
......@@ -5351,6 +5351,8 @@ class SharedFunctionInfo: public HeapObject {
inline int deopt_counter();
inline void set_deopt_counter(int counter);
inline int profiler_ticks();
// Inline cache age is used to infer whether the function survived a context
// disposal or not. In the former case we reset the opt_count.
inline int ic_age();
......
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