Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: src/runtime-profiler.cc

Issue 2481433002: [Interpreter] Add IsInterpreted() to JSFunction and use to fix test-heap tests. (Closed)
Patch Set: Fix always-opt Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 289eb1b43c2c35787a49c9b46807967dc5321509..fc8c15ec54263937cad19d6ccfe42aadd8aecfed 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -114,8 +114,7 @@ static void GetICCounts(JSFunction* function, int* ic_with_type_info_count,
// Harvest vector-ics as well
TypeFeedbackVector* vector = function->feedback_vector();
int with = 0, gen = 0, type_vector_ic_count = 0;
- const bool is_interpreted =
- function->shared()->code()->is_interpreter_trampoline_builtin();
+ const bool is_interpreted = function->shared()->IsInterpreted();
vector->ComputeCounts(&with, &gen, &type_vector_ic_count, is_interpreted);
*ic_total_count += type_vector_ic_count;
@@ -161,11 +160,7 @@ void RuntimeProfiler::Baseline(JSFunction* function,
OptimizationReason reason) {
DCHECK_NE(reason, OptimizationReason::kDoNotOptimize);
TraceRecompile(function, OptimizationReasonToString(reason), "baseline");
-
- // TODO(4280): Fix this to check function is compiled for the interpreter
- // once we have a standard way to check that. For now function will only
- // have a bytecode array if compiled for the interpreter.
- DCHECK(function->shared()->HasBytecodeArray());
+ DCHECK(function->shared()->IsInterpreted());
function->MarkForBaseline();
}
@@ -470,7 +465,7 @@ void RuntimeProfiler::MarkCandidatesForOptimization() {
Compiler::CompilationTier next_tier =
Compiler::NextCompilationTier(function);
- if (function->shared()->code()->is_interpreter_trampoline_builtin()) {
+ if (function->shared()->IsInterpreted()) {
if (next_tier == Compiler::BASELINE) {
MaybeBaselineIgnition(function, frame);
} else {

Powered by Google App Engine
This is Rietveld 408576698