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

Unified Diff: src/objects.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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 8e8830a768522103da2f79173b33d174e3150664..528184c1d039db3ce66325a09c4c52c6c0694eb0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10703,12 +10703,22 @@ bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) {
Code* unoptimized = code();
DeoptimizationOutputData* data =
DeoptimizationOutputData::cast(unoptimized->deoptimization_data());
- unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this);
+ unsigned ignore = Deoptimizer::GetOutputInfoIndex(data, id, this);
USE(ignore);
return true; // Return true if there was no ASSERT.
}
+#if defined(COMPARE_OPT_STACK_HEIGHT)
+int SharedFunctionInfo::GetExpectedStackHeight(BailoutId id) {
+ ASSERT(!id.IsNone());
+ Code* unoptimized = code();
+ DeoptimizationOutputData* data =
+ DeoptimizationOutputData::cast(unoptimized->deoptimization_data());
+ return Deoptimizer::GetOutputInfoStackHeight(data, id, this);
+}
+#endif
+
void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) {
ASSERT(!IsInobjectSlackTrackingInProgress());
@@ -11616,6 +11626,18 @@ void DeoptimizationOutputData::DeoptimizationOutputDataPrint(FILE* out) {
this->DeoptPoints());
if (this->DeoptPoints() == 0) return;
+#if defined(COMPARE_OPT_STACK_HEIGHT)
+ PrintF(out, "%6s %8s %15s %s\n", "ast id", "pc", "state", "stack height");
+ for (int i = 0; i < this->DeoptPoints(); i++) {
+ int pc_and_state = this->PcAndState(i)->value();
+ PrintF(out, "%6d %8d %15s %i\n",
+ this->AstId(i).ToInt(),
+ FullCodeGenerator::PcField::decode(pc_and_state),
+ FullCodeGenerator::State2String(
+ FullCodeGenerator::StateField::decode(pc_and_state)),
+ this->StackHeight(i)->value());
+ }
+#else
PrintF(out, "%6s %8s %s\n", "ast id", "pc", "state");
for (int i = 0; i < this->DeoptPoints(); i++) {
int pc_and_state = this->PcAndState(i)->value();
@@ -11625,6 +11647,7 @@ void DeoptimizationOutputData::DeoptimizationOutputDataPrint(FILE* out) {
FullCodeGenerator::State2String(
FullCodeGenerator::StateField::decode(pc_and_state)));
}
+#endif
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698