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

Unified Diff: src/deoptimizer.cc

Issue 192513002: Checking for stack height equality between full codegen and hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 7 months 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/deoptimizer.h ('k') | src/full-codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 6e9ead7e2040c63fda2dbbe4dd3f5853866db775..ce10b6df1f698dad6da3ad770c8f8771bbc4370f 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -687,16 +687,17 @@ int Deoptimizer::GetDeoptimizationId(Isolate* isolate,
}
-int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
- BailoutId id,
- SharedFunctionInfo* shared) {
+int Deoptimizer::GetOutputInfoIndex(
+ DeoptimizationOutputData* data,
+ BailoutId id,
+ SharedFunctionInfo* shared) {
// TODO(kasperl): For now, we do a simple linear search for the PC
// offset associated with the given node id. This should probably be
// changed to a binary search.
int length = data->DeoptPoints();
for (int i = 0; i < length; i++) {
if (data->AstId(i) == id) {
- return data->PcAndState(i)->value();
+ return i;
}
}
PrintF(stderr, "[couldn't find pc offset for node=%d]\n", id.ToInt());
@@ -712,6 +713,27 @@ int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
}
+int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
+ BailoutId id,
+ SharedFunctionInfo* shared) {
+ int idx = GetOutputInfoIndex(data, id, shared);
+ ASSERT(idx >= 0 && data->AstId(idx) == id);
+ return data->PcAndState(idx)->value();
+}
+
+
+#if defined(COMPARE_OPT_STACK_HEIGHT)
+int Deoptimizer::GetOutputInfoStackHeight(
+ DeoptimizationOutputData* data,
+ BailoutId id,
+ SharedFunctionInfo* shared) {
+ int idx = GetOutputInfoIndex(data, id, shared);
+ ASSERT(idx >= 0 && data->AstId(idx) == id);
+ return data->StackHeight(idx)->value();
+}
+#endif
+
+
int Deoptimizer::GetDeoptimizedCodeCount(Isolate* isolate) {
int length = 0;
// Count all entries in the deoptimizing code list of every context.
« no previous file with comments | « src/deoptimizer.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698