| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 18967)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -2721,12 +2721,18 @@
|
| };
|
|
|
|
|
| +enum StoreBarrierType {
|
| + kNoStoreBarrier,
|
| + kEmitStoreBarrier
|
| +};
|
| +
|
| +
|
| class StoreInstanceFieldInstr : public TemplateDefinition<2> {
|
| public:
|
| StoreInstanceFieldInstr(const Field& field,
|
| Value* instance,
|
| Value* value,
|
| - bool emit_store_barrier)
|
| + StoreBarrierType emit_store_barrier)
|
| : field_(field), emit_store_barrier_(emit_store_barrier) {
|
| SetInputAt(0, instance);
|
| SetInputAt(1, value);
|
| @@ -2740,7 +2746,8 @@
|
| Value* instance() const { return inputs_[0]; }
|
| Value* value() const { return inputs_[1]; }
|
| bool ShouldEmitStoreBarrier() const {
|
| - return value()->NeedsStoreBuffer() && emit_store_barrier_;
|
| + return value()->NeedsStoreBuffer()
|
| + && (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| @@ -2751,7 +2758,7 @@
|
|
|
| private:
|
| const Field& field_;
|
| - const bool emit_store_barrier_;
|
| + const StoreBarrierType emit_store_barrier_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr);
|
| };
|
| @@ -2887,7 +2894,7 @@
|
| StoreIndexedInstr(Value* array,
|
| Value* index,
|
| Value* value,
|
| - bool emit_store_barrier,
|
| + StoreBarrierType emit_store_barrier,
|
| intptr_t class_id,
|
| intptr_t deopt_id)
|
| : emit_store_barrier_(emit_store_barrier),
|
| @@ -2906,7 +2913,8 @@
|
| intptr_t class_id() const { return class_id_; }
|
|
|
| bool ShouldEmitStoreBarrier() const {
|
| - return value()->NeedsStoreBuffer() && emit_store_barrier_;
|
| + return value()->NeedsStoreBuffer()
|
| + && (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
| @@ -2922,7 +2930,7 @@
|
| }
|
|
|
| private:
|
| - const bool emit_store_barrier_;
|
| + const StoreBarrierType emit_store_barrier_;
|
| const intptr_t class_id_;
|
| const intptr_t deopt_id_;
|
|
|
|
|