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

Unified Diff: src/runtime-profiler.cc

Issue 2481433002: [Interpreter] Add IsInterpreted() to JSFunction and use to fix test-heap tests. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 682da57330b97c63d0046ddd299c231cb126cd6e..2762f2327178108f32b20669dbdacbc3bbc351a9 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -110,8 +110,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;
@@ -157,11 +156,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();
}
@@ -464,7 +459,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 {
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698