Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 2e6735f3fc4709fba78ef8043cc1efd1c2d66328..4ac8034b043ad1b5387ec3690a533a559ac5331a 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -40,6 +40,8 @@ class Simulator; |
class StackResource; |
class StackZone; |
class StubCode; |
+class RawFloat32x4; |
+class RawUint32x4; |
// Used by the deoptimization infrastructure to defer allocation of Double |
@@ -81,6 +83,44 @@ class DeferredMint { |
}; |
+class DeferredFloat32x4 { |
Vyacheslav Egorov (Google)
2013/03/17 18:17:10
This is a lot of code duplication.
Suggestion: m
Cutch
2013/03/17 21:52:37
Done.
|
+ public: |
+ DeferredFloat32x4(simd128_value_t value, RawFloat32x4** slot, |
+ DeferredFloat32x4* next) |
+ : value_(value), slot_(slot), next_(next) { } |
+ |
+ simd128_value_t value() const { return value_; } |
+ RawFloat32x4** slot() const { return slot_; } |
+ DeferredFloat32x4* next() const { return next_; } |
+ |
+ private: |
+ const simd128_value_t value_; |
+ RawFloat32x4** const slot_; |
+ DeferredFloat32x4* const next_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeferredFloat32x4); |
+}; |
+ |
+ |
+class DeferredUint32x4 { |
+ public: |
+ DeferredUint32x4(simd128_value_t value, RawUint32x4** slot, |
+ DeferredUint32x4* next) |
+ : value_(value), slot_(slot), next_(next) { } |
+ |
+ simd128_value_t value() const { return value_; } |
+ RawUint32x4** slot() const { return slot_; } |
+ DeferredUint32x4* next() const { return next_; } |
+ |
+ private: |
+ const simd128_value_t value_; |
+ RawUint32x4** const slot_; |
+ DeferredUint32x4* const next_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeferredUint32x4); |
+}; |
+ |
+ |
class Isolate : public BaseIsolate { |
public: |
~Isolate(); |
@@ -308,10 +348,10 @@ class Isolate : public BaseIsolate { |
ASSERT((value == NULL) || (deopt_cpu_registers_copy_ == NULL)); |
deopt_cpu_registers_copy_ = value; |
} |
- double* deopt_fpu_registers_copy() const { |
+ fpu_register_t* deopt_fpu_registers_copy() const { |
return deopt_fpu_registers_copy_; |
} |
- void set_deopt_fpu_registers_copy(double* value) { |
+ void set_deopt_fpu_registers_copy(fpu_register_t* value) { |
ASSERT((value == NULL) || (deopt_fpu_registers_copy_ == NULL)); |
deopt_fpu_registers_copy_ = value; |
} |
@@ -332,6 +372,18 @@ class Isolate : public BaseIsolate { |
deferred_mints_ = new DeferredMint(value, slot, deferred_mints_); |
} |
+ void DeferFloat32x4Materialization(simd128_value_t value, |
+ RawFloat32x4** slot) { |
+ deferred_float32x4s_ = new DeferredFloat32x4(value, slot, |
+ deferred_float32x4s_); |
+ } |
+ |
+ void DeferUint32x4Materialization(simd128_value_t value, |
+ RawUint32x4** slot) { |
+ deferred_uint32x4s_ = new DeferredUint32x4(value, slot, |
+ deferred_uint32x4s_); |
+ } |
+ |
DeferredDouble* DetachDeferredDoubles() { |
DeferredDouble* list = deferred_doubles_; |
deferred_doubles_ = NULL; |
@@ -344,6 +396,18 @@ class Isolate : public BaseIsolate { |
return list; |
} |
+ DeferredFloat32x4* DetachDeferredFloat32x4s() { |
+ DeferredFloat32x4* list = deferred_float32x4s_; |
+ deferred_float32x4s_ = NULL; |
+ return list; |
+ } |
+ |
+ DeferredUint32x4* DetachDeferredUint32x4s() { |
+ DeferredUint32x4* list = deferred_uint32x4s_; |
+ deferred_uint32x4s_ = NULL; |
+ return list; |
+ } |
+ |
static char* GetStatus(const char* request); |
private: |
@@ -385,11 +449,13 @@ class Isolate : public BaseIsolate { |
// Deoptimization support. |
intptr_t* deopt_cpu_registers_copy_; |
- double* deopt_fpu_registers_copy_; |
+ fpu_register_t* deopt_fpu_registers_copy_; |
intptr_t* deopt_frame_copy_; |
intptr_t deopt_frame_copy_size_; |
DeferredDouble* deferred_doubles_; |
DeferredMint* deferred_mints_; |
+ DeferredFloat32x4* deferred_float32x4s_; |
+ DeferredUint32x4* deferred_uint32x4s_; |
static Dart_IsolateCreateCallback create_callback_; |
static Dart_IsolateInterruptCallback interrupt_callback_; |