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

Unified Diff: runtime/vm/intermediate_language.h

Issue 353513002: Use range information for optimizing integer boxing and fix bug in range analysis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | 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 37654)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -1811,6 +1811,7 @@
IsBinaryMintOp() ||
IsUnaryMintOp() ||
IsShiftMintOp() ||
+ IsBoxInteger() ||
IsUnboxInteger();
}
@@ -5096,12 +5097,15 @@
class BoxIntegerInstr : public TemplateDefinition<1> {
public:
- explicit BoxIntegerInstr(Value* value) {
+ explicit BoxIntegerInstr(Value* value) : is_smi_(false) {
SetInputAt(0, value);
}
Value* value() const { return inputs_[0]; }
+ bool is_smi() const { return is_smi_; }
+ void set_is_smi(bool is_smi) { is_smi_ = is_smi; }
+
virtual bool CanDeoptimize() const { return false; }
virtual intptr_t DeoptimizationTarget() const {
@@ -5115,7 +5119,10 @@
DECLARE_INSTRUCTION(BoxInteger)
virtual CompileType ComputeType() const;
+ virtual bool RecomputeType();
+ virtual void InferRange();
+
virtual bool AllowsCSE() const { return true; }
virtual EffectSet Effects() const { return EffectSet::None(); }
virtual EffectSet Dependencies() const { return EffectSet::None(); }
@@ -5124,6 +5131,8 @@
virtual bool MayThrow() const { return false; }
private:
+ bool is_smi_;
+
DISALLOW_COPY_AND_ASSIGN(BoxIntegerInstr);
};
@@ -7139,6 +7148,8 @@
return deopt_id_;
}
+ virtual void InferRange();
+
DECLARE_INSTRUCTION(ShiftMintOp)
virtual bool AllowsCSE() const { return true; }
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698