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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12377017: Use enum instead of bool parameter in IL instructions to indicate if a store barrier is needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698