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

Unified Diff: src/lithium.cc

Issue 16128004: Reorder switch clauses using newly-introduced execution counters in (Closed) Base URL: gh:v8/v8.git@master
Patch Set: tweak heuristic Created 7 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/lithium.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/lithium.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698