Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 3adb40bfb4ccabfebf50722c445453e545688b6f..4017e42413a316574ddac72e47a32645091e15f3 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -31,11 +31,31 @@ class ObjectPointerVisitor; |
class ObjectStore; |
class RawArray; |
class RawContext; |
+class RawDouble; |
class RawError; |
class StackResource; |
class StubCode; |
class Zone; |
+ |
+class DeferredDouble { |
srdjan
2012/08/30 17:59:24
Add very brief comment what this class is for.
Vyacheslav Egorov (Google)
2012/09/21 12:51:52
Done.
|
+ public: |
+ DeferredDouble(double value, RawDouble** slot, DeferredDouble* next) |
+ : value_(value), slot_(slot), next_(next) { } |
+ |
+ double value() const { return value_; } |
+ RawDouble** slot() const { return slot_; } |
+ DeferredDouble* next() { return next_; } |
srdjan
2012/08/30 17:59:24
const
Vyacheslav Egorov (Google)
2012/09/21 12:51:52
Done.
|
+ |
+ private: |
+ const double value_; |
+ RawDouble** const slot_; |
+ DeferredDouble* const next_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeferredDouble); |
+}; |
+ |
+ |
class Isolate : public BaseIsolate { |
public: |
~Isolate(); |
@@ -220,10 +240,19 @@ class Isolate : public BaseIsolate { |
return shutdown_callback_; |
} |
- intptr_t* deopt_registers_copy() const { return deopt_registers_copy_; } |
- void set_deopt_registers_copy(intptr_t* value) { |
- ASSERT((value == NULL) || (deopt_registers_copy_ == NULL)); |
- deopt_registers_copy_ = value; |
+ intptr_t* deopt_cpu_registers_copy() const { |
+ return deopt_cpu_registers_copy_; |
+ } |
+ void set_deopt_cpu_registers_copy(intptr_t* value) { |
+ ASSERT((value == NULL) || (deopt_cpu_registers_copy_ == NULL)); |
+ deopt_cpu_registers_copy_ = value; |
+ } |
+ double* deopt_xmm_registers_copy() const { |
+ return deopt_xmm_registers_copy_; |
+ } |
+ void set_deopt_xmm_registers_copy(double* value) { |
+ ASSERT((value == NULL) || (deopt_xmm_registers_copy_ == NULL)); |
+ deopt_xmm_registers_copy_ = value; |
} |
intptr_t* deopt_frame_copy() const { return deopt_frame_copy_; } |
void SetDeoptFrameCopy(intptr_t* value, intptr_t size) { |
@@ -234,6 +263,17 @@ class Isolate : public BaseIsolate { |
} |
intptr_t deopt_frame_copy_size() const { return deopt_frame_copy_size_; } |
+ void DeferDoubleMaterialization(double value, RawDouble** slot) { |
+ deferred_doubles_ = new DeferredDouble( |
+ value, slot, deferred_doubles_); |
+ } |
+ |
+ DeferredDouble* DetachDeferredDoubles() { |
+ DeferredDouble* list = deferred_doubles_; |
+ deferred_doubles_ = NULL; |
+ return list; |
+ } |
+ |
private: |
Isolate(); |
@@ -273,9 +313,11 @@ class Isolate : public BaseIsolate { |
GcPrologueCallbacks gc_prologue_callbacks_; |
GcEpilogueCallbacks gc_epilogue_callbacks_; |
// Deoptimization support. |
- intptr_t* deopt_registers_copy_; |
+ intptr_t* deopt_cpu_registers_copy_; |
+ double* deopt_xmm_registers_copy_; |
intptr_t* deopt_frame_copy_; |
intptr_t deopt_frame_copy_size_; |
+ DeferredDouble* deferred_doubles_; |
static Dart_IsolateCreateCallback create_callback_; |
static Dart_IsolateInterruptCallback interrupt_callback_; |