Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 5459679982d152f63ffad01e0d27d32b40122a38..49fbdd815ad4353a4c868f7b1bfd6e7b783d8f42 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10384,6 +10384,19 @@ void Code::PrintDeoptLocation(int bailout_id) { |
} |
+bool Code::CanDeoptAt(Address pc) { |
+ DeoptimizationInputData* deopt_data = |
+ DeoptimizationInputData::cast(deoptimization_data()); |
+ Address code_start_address = instruction_start(); |
+ for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
+ if (deopt_data->Pc(i)->value() == -1) continue; |
+ Address address = code_start_address + deopt_data->Pc(i)->value(); |
+ if (address == pc) return true; |
+ } |
+ return false; |
+} |
+ |
+ |
// Identify kind of code. |
const char* Code::Kind2String(Kind kind) { |
switch (kind) { |