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

Unified Diff: src/frames.cc

Issue 2247353005: [builtins] support exception handling in TFJ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move impl to CodeAssembler, refactor api a bit Created 4 years, 4 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
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 83b8d83c74c9f090eb5e3282dfb81ae44b31222e..fd996e16bb205630d97301c58e35418459dcba0d 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -879,6 +879,20 @@ Code* StubFrame::unchecked_code() const {
return static_cast<Code*>(isolate()->FindCodeObject(pc()));
}
+int StubFrame::LookupExceptionHandlerInTable(
caitp 2016/08/19 14:30:09 seems to be unnecessary, only seemed to come up du
+ int* stack_slots, HandlerTable::CatchPrediction* prediction) {
+ DCHECK_NULL(prediction);
+ Code* code = LookupCode();
+
+ // Only support catch handlers in TFJ builtins.
+ if (!code->is_turbofanned()) return -1;
+ if (code->kind() != Code::BUILTIN) return -1;
+
+ HandlerTable* table = HandlerTable::cast(code->handler_table());
+ int pc_offset = static_cast<int>(pc() - code->entry());
+ if (stack_slots) *stack_slots = code->stack_slots();
+ return table->LookupReturn(pc_offset);
+}
Address StubFrame::GetCallerStackPointer() const {
return fp() + ExitFrameConstants::kCallerSPOffset;

Powered by Google App Engine
This is Rietveld 408576698