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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10870004: Separate the checks from StoreInstanceField so that they can be eliminated. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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/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 11114)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -1003,11 +1003,11 @@
class LoadInstanceFieldComp : public TemplateComputation<1> {
public:
+ // Set 'original' to NULL if LoadInstanceFieldComp cannot deoptimize.
LoadInstanceFieldComp(const Field& field,
Value* instance,
- InstanceCallComp* original, // Maybe NULL.
- bool can_deoptimize)
- : field_(field), original_(original), can_deoptimize_(can_deoptimize) {
+ InstanceCallComp* original)
+ : field_(field), original_(original) {
ASSERT(instance != NULL);
inputs_[0] = instance;
}
@@ -1020,12 +1020,11 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
- virtual bool CanDeoptimize() const { return can_deoptimize_; }
+ virtual bool CanDeoptimize() const { return original_ != NULL; }
private:
const Field& field_;
const InstanceCallComp* original_; // For optimizations.
- const bool can_deoptimize_;
DISALLOW_COPY_AND_ASSIGN(LoadInstanceFieldComp);
};
@@ -1033,6 +1032,7 @@
class StoreInstanceFieldComp : public TemplateComputation<2> {
public:
+ // Set 'original' to NULL if StoreInstanceFieldComp cannot deoptimize.
StoreInstanceFieldComp(const Field& field,
Value* instance,
Value* value,
@@ -1055,7 +1055,7 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
- virtual bool CanDeoptimize() const { return true; }
+ virtual bool CanDeoptimize() const { return original_ != NULL; }
private:
const Field& field_;
« 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