#include "src/v8.h"
#include "src/ast.h"
+#include "src/base/bits.h"
#include "src/deoptimizer.h"
#include "src/frames-inl.h"
#include "src/full-codegen.h"
DCHECK(frames->length() == 0);
DCHECK(is_optimized());
- // Delegate to JS frame in absence of inlining.
- // TODO(turbofan): Revisit once we support inlining.
- if (LookupCode()->is_turbofanned()) {
+ // Delegate to JS frame in absence of turbofan deoptimization.
+ // TODO(turbofan): Revisit once we support deoptimization across the board.
+ if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
return JavaScriptFrame::Summarize(frames);
}
int OptimizedFrame::GetInlineCount() {
DCHECK(is_optimized());
- // Delegate to JS frame in absence of inlining.
- // TODO(turbofan): Revisit once we support inlining.
- if (LookupCode()->is_turbofanned()) {
+ // Delegate to JS frame in absence of turbofan deoptimization.
+ // TODO(turbofan): Revisit once we support deoptimization across the board.
+ if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
return JavaScriptFrame::GetInlineCount();
}
DCHECK(functions->length() == 0);
DCHECK(is_optimized());
- // Delegate to JS frame in absence of inlining.
- // TODO(turbofan): Revisit once we support inlining.
- if (LookupCode()->is_turbofanned()) {
+ // Delegate to JS frame in absence of turbofan deoptimization.
+ // TODO(turbofan): Revisit once we support deoptimization across the board.
+ if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
return JavaScriptFrame::GetFunctions(functions);
}
InnerPointerToCodeCache::InnerPointerToCodeCacheEntry*
InnerPointerToCodeCache::GetCacheEntry(Address inner_pointer) {
isolate_->counters()->pc_to_code()->Increment();
- DCHECK(IsPowerOf2(kInnerPointerToCodeCacheSize));
+ DCHECK(base::bits::IsPowerOfTwo32(kInnerPointerToCodeCacheSize));
uint32_t hash = ComputeIntegerHash(
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(inner_pointer)),
v8::internal::kZeroHashSeed);
// -------------------------------------------------------------------------
-int NumRegs(RegList reglist) {
- return CompilerIntrinsics::CountSetBits(reglist);
-}
+int NumRegs(RegList reglist) { return base::bits::CountPopulation32(reglist); }
struct JSCallerSavedCodeData {