Reviewers: Michael Starzinger,
Description:
[frames] Remove obsolete JavaScriptFrame::GetInlineCount() method.
[email protected]
Please review this at https://codereview.chromium.org/1176473002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+7, -33 lines):
M src/frames.h
M src/frames.cc
M test/cctest/compiler/test-run-inlining.cc
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index
dc67b41ad825325a0639dff4f67f0e84668cd7b3..9591011f3d0ee6b18816c1e6ee53fb221346cc09
100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1013,30 +1013,6 @@ DeoptimizationInputData*
OptimizedFrame::GetDeoptimizationData(
}
-int OptimizedFrame::GetInlineCount() {
- DCHECK(is_optimized());
-
- // Delegate to JS frame in absence of turbofan deoptimization.
- // TODO(turbofan): Revisit once we support deoptimization across the
board.
- if (LookupCode()->is_turbofanned() &&
function()->shared()->asm_function() &&
- !FLAG_turbo_asm_deoptimization) {
- return JavaScriptFrame::GetInlineCount();
- }
-
- int deopt_index = Safepoint::kNoDeoptimizationIndex;
- DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
-
- TranslationIterator it(data->TranslationByteArray(),
- data->TranslationIndex(deopt_index)->value());
- Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next());
- DCHECK(opcode == Translation::BEGIN);
- USE(opcode);
- it.Next(); // Drop frame count.
- int jsframe_count = it.Next();
- return jsframe_count;
-}
-
-
void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
DCHECK(functions->length() == 0);
DCHECK(is_optimized());
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index
b4247c9bdbe97ef710dacb9e52cd8e173bab02df..1bd8f3026b6af672cd4d2c2e27ac3dbfdc710c40
100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -550,9 +550,6 @@ class JavaScriptFrame: public StandardFrame {
// Determine the code for the frame.
virtual Code* unchecked_code() const;
- // Returns the levels of inlining for this frame.
- virtual int GetInlineCount() { return 1; }
-
// Return a list with JSFunctions of this frame.
virtual void GetFunctions(List<JSFunction*>* functions);
@@ -627,8 +624,6 @@ class OptimizedFrame : public JavaScriptFrame {
// GC support.
virtual void Iterate(ObjectVisitor* v) const;
- virtual int GetInlineCount();
-
// Return a list with JSFunctions of this frame.
// The functions are ordered bottom-to-top (i.e. functions.last()
// is the top-most activation)
Index: test/cctest/compiler/test-run-inlining.cc
diff --git a/test/cctest/compiler/test-run-inlining.cc
b/test/cctest/compiler/test-run-inlining.cc
index
3de929cbc81ee03a7dffc112ec3063c7c245dd47..76cd4a8eb6335ba4b1c4a2b5c28a423f1d793d36
100644
--- a/test/cctest/compiler/test-run-inlining.cc
+++ b/test/cctest/compiler/test-run-inlining.cc
@@ -13,7 +13,7 @@ using namespace v8::internal::compiler;
namespace {
-// Helper to determine inline count via JavaScriptFrame::GetInlineCount.
+// Helper to determine inline count via JavaScriptFrame::GetFunctions.
// Note that a count of 1 indicates that no inlining has occured.
void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) {
StackTraceFrameIterator it(CcTest::i_isolate());
@@ -21,14 +21,17 @@ void AssertInlineCount(const
v8::FunctionCallbackInfo<v8::Value>& args) {
JavaScriptFrame* topmost = it.frame();
while (!it.done()) {
JavaScriptFrame* frame = it.frame();
+ List<JSFunction*> functions(2);
+ frame->GetFunctions(&functions);
PrintF("%d %s, inline count: %d\n", frames_seen,
frame->function()->shared()->DebugName()->ToCString().get(),
- frame->GetInlineCount());
+ functions.length());
frames_seen++;
it.Advance();
}
- CHECK_EQ(args[0]->ToInt32(args.GetIsolate())->Value(),
- topmost->GetInlineCount());
+ List<JSFunction*> functions(2);
+ topmost->GetFunctions(&functions);
+ CHECK_EQ(args[0]->ToInt32(args.GetIsolate())->Value(),
functions.length());
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.