Index: src/lithium.cc |
diff --git a/src/lithium.cc b/src/lithium.cc |
index 9f44b7ef5a686f833b7665c26c35df67abd1b3d4..e00036c31d683afc77688411bb915d21134efab4 100644 |
--- a/src/lithium.cc |
+++ b/src/lithium.cc |
@@ -492,4 +492,19 @@ void LChunk::set_allocated_double_registers(BitVector* allocated_registers) { |
} |
+// Common method |
+void LCodeGen::PopulateDeoptCounterCells(Handle<Code> code) { |
+ if (deopt_counter_cells_.is_empty()) return; |
+ Handle<FixedArray> cells = |
+ factory()->NewFixedArray(deopt_counter_cells_.length(), TENURED); |
+ { ALLOW_HANDLE_DEREF(isolate(), |
+ "copying a ZoneList of counter cells into a FixedArray"); |
+ for (int i = 0; i < deopt_counter_cells_.length(); i++) { |
+ cells->set(i, *deopt_counter_cells_[i]->cell()); |
+ } |
+ code->set_deopt_counter_cells(*cells); |
+ } |
+} |
+ |
+ |
} } // namespace v8::internal |