| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_DEFERRED_OBJECTS_H_ | 5 #ifndef VM_DEFERRED_OBJECTS_H_ |
| 6 #define VM_DEFERRED_OBJECTS_H_ | 6 #define VM_DEFERRED_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 intptr_t index() const { return index_; } | 134 intptr_t index() const { return index_; } |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 const intptr_t index_; | 137 const intptr_t index_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(DeferredObjectRef); | 139 DISALLOW_COPY_AND_ASSIGN(DeferredObjectRef); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 | 142 |
| 143 class DeferredRetAddr : public DeferredSlot { |
| 144 public: |
| 145 DeferredRetAddr(intptr_t index, |
| 146 intptr_t deopt_id, |
| 147 RawObject** slot, |
| 148 DeferredSlot* next) |
| 149 : DeferredSlot(slot, next), index_(index), deopt_id_(deopt_id) { } |
| 150 |
| 151 virtual void Materialize(DeoptContext* deopt_context); |
| 152 |
| 153 intptr_t index() const { return index_; } |
| 154 |
| 155 private: |
| 156 const intptr_t index_; |
| 157 const intptr_t deopt_id_; |
| 158 |
| 159 DISALLOW_COPY_AND_ASSIGN(DeferredRetAddr); |
| 160 }; |
| 161 |
| 162 |
| 163 class DeferredPcMarker : public DeferredSlot { |
| 164 public: |
| 165 DeferredPcMarker(intptr_t index, RawObject** slot, DeferredSlot* next) |
| 166 : DeferredSlot(slot, next), index_(index) { } |
| 167 |
| 168 virtual void Materialize(DeoptContext* deopt_context); |
| 169 |
| 170 intptr_t index() const { return index_; } |
| 171 |
| 172 private: |
| 173 const intptr_t index_; |
| 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(DeferredPcMarker); |
| 176 }; |
| 177 |
| 178 |
| 179 class DeferredPp : public DeferredSlot { |
| 180 public: |
| 181 DeferredPp(intptr_t index, RawObject** slot, DeferredSlot* next) |
| 182 : DeferredSlot(slot, next), index_(index) { } |
| 183 |
| 184 virtual void Materialize(DeoptContext* deopt_context); |
| 185 |
| 186 intptr_t index() const { return index_; } |
| 187 |
| 188 private: |
| 189 const intptr_t index_; |
| 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(DeferredPp); |
| 192 }; |
| 193 |
| 194 |
| 143 // Describes an object which allocation was removed by AllocationSinking pass. | 195 // Describes an object which allocation was removed by AllocationSinking pass. |
| 144 // Arguments for materialization are stored as a part of expression stack | 196 // Arguments for materialization are stored as a part of expression stack |
| 145 // for the bottommost deoptimized frame so that GC could discover them. | 197 // for the bottommost deoptimized frame so that GC could discover them. |
| 146 // They will be removed from the stack at the very end of deoptimization. | 198 // They will be removed from the stack at the very end of deoptimization. |
| 147 class DeferredObject { | 199 class DeferredObject { |
| 148 public: | 200 public: |
| 149 DeferredObject(intptr_t field_count, intptr_t* args) | 201 DeferredObject(intptr_t field_count, intptr_t* args) |
| 150 : field_count_(field_count), | 202 : field_count_(field_count), |
| 151 args_(reinterpret_cast<RawObject**>(args)), | 203 args_(reinterpret_cast<RawObject**>(args)), |
| 152 object_(NULL) { } | 204 object_(NULL) { } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 257 |
| 206 // Object materialized from this description. | 258 // Object materialized from this description. |
| 207 const Object* object_; | 259 const Object* object_; |
| 208 | 260 |
| 209 DISALLOW_COPY_AND_ASSIGN(DeferredObject); | 261 DISALLOW_COPY_AND_ASSIGN(DeferredObject); |
| 210 }; | 262 }; |
| 211 | 263 |
| 212 } // namespace dart | 264 } // namespace dart |
| 213 | 265 |
| 214 #endif // VM_DEFERRED_OBJECTS_H_ | 266 #endif // VM_DEFERRED_OBJECTS_H_ |
| OLD | NEW |