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

Unified Diff: src/frames.cc

Issue 12490013: Deoptimizer support for hydrogen stubs that accept a variable number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 9 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.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index ed407e796b637af4072e6be69b85c8cd64fe86c0..aaf8c79e23256a12d4d3a7fe7bce939f9f604ff8 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1311,18 +1311,19 @@ Address StubFailureTrampolineFrame::GetCallerStackPointer() const {
Code* StubFailureTrampolineFrame::unchecked_code() const {
- int i = 0;
- for (; i <= StubFailureTrampolineStub::kMaxExtraExpressionStackCount; ++i) {
- Code* trampoline;
- StubFailureTrampolineStub(i).FindCodeInCache(&trampoline, isolate());
- ASSERT(trampoline != NULL);
- Address current_pc = pc();
- Address code_start = trampoline->instruction_start();
- Address code_end = code_start + trampoline->instruction_size();
- if (code_start <= current_pc && current_pc < code_end) {
- return trampoline;
- }
+ Code* trampoline;
+ StubFailureTrampolineStub(NOT_JS_FUNCTION_STUB_MODE).
+ FindCodeInCache(&trampoline, isolate());
+ if (trampoline->contains(pc())) {
+ return trampoline;
}
+
+ StubFailureTrampolineStub(JS_FUNCTION_STUB_MODE).
+ FindCodeInCache(&trampoline, isolate());
+ if (trampoline->contains(pc())) {
+ return trampoline;
+ }
+
UNREACHABLE();
return NULL;
}
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698