Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
index 5956baad8851d458bea783c1bbce0adc2aabe38b..886c0ac114538c0298b02ea9ceaf4401edf9e60c 100644 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -1148,6 +1148,14 @@ class Isolate { |
// Given an address occupied by a live code object, return that object. |
Object* FindCodeObject(Address a); |
+ int NextOptimizationId() { |
+ int id = next_optimization_id_++; |
+ if (!Smi::IsValid(next_optimization_id_)) { |
+ next_optimization_id_ = 0; |
+ } |
+ return id; |
+ } |
+ |
private: |
Isolate(); |
@@ -1378,6 +1386,8 @@ class Isolate { |
// Counts deopt points if deopt_every_n_times is enabled. |
unsigned int stress_deopt_count_; |
+ int next_optimization_id_; |
+ |
friend class ExecutionAccess; |
friend class HandleScopeImplementer; |
friend class IsolateInitializer; |