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

Unified Diff: runtime/vm/isolate.h

Issue 10919008: Unbox phis that were proven to be of type Double. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Srdjan's comments Created 8 years, 4 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 | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 3adb40bfb4ccabfebf50722c445453e545688b6f..e7274d6f4fa3cd8b365426e59c17cecd6e4936f8 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -31,11 +31,34 @@ class ObjectPointerVisitor;
class ObjectStore;
class RawArray;
class RawContext;
+class RawDouble;
class RawError;
class StackResource;
class StubCode;
class Zone;
+
+// Used by the deoptimization infrastructure to defer allocation of Double
+// objects until frame is fully rewritten and GC is safe.
+// See callers of Isolate::DeferDoubleMaterialization.
+class DeferredDouble {
+ 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() const { return next_; }
+
+ private:
+ const double value_;
+ RawDouble** const slot_;
+ DeferredDouble* const next_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeferredDouble);
+};
+
+
class Isolate : public BaseIsolate {
public:
~Isolate();
@@ -220,10 +243,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 +266,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 +316,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_;
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698