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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11773040: Canonicalize away simple arithmetic equivalences. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test, address comments Created 7 years, 11 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 | « no previous file | 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
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index b8ac5a3f0dce352d193dc6eba9c9dc24820abbb6..d900ca1e5f6c9ed34c0ec99e260b79281f0dd257 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3519,6 +3519,7 @@ class UnboxIntegerInstr : public TemplateDefinition<1> {
return kUnboxedMint;
}
+
virtual bool AffectedBySideEffect() const { return false; }
virtual bool AttributesEqual(Instruction* other) const { return true; }
@@ -3576,9 +3577,9 @@ class MathSqrtInstr : public TemplateDefinition<1> {
class BinaryDoubleOpInstr : public TemplateDefinition<2> {
public:
BinaryDoubleOpInstr(Token::Kind op_kind,
- Value* left,
- Value* right,
- InstanceCallInstr* instance_call)
+ Value* left,
+ Value* right,
+ InstanceCallInstr* instance_call)
: op_kind_(op_kind) {
ASSERT(left != NULL);
ASSERT(right != NULL);
@@ -3624,6 +3625,8 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2> {
DECLARE_INSTRUCTION(BinaryDoubleOp)
virtual RawAbstractType* CompileType() const;
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
private:
const Token::Kind op_kind_;
@@ -3682,6 +3685,8 @@ class BinaryMintOpInstr : public TemplateDefinition<2> {
return deopt_id_;
}
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
DECLARE_INSTRUCTION(BinaryMintOp)
private:
@@ -3853,6 +3858,8 @@ class BinarySmiOpInstr : public TemplateDefinition<2> {
virtual void InferRange();
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
private:
const Token::Kind op_kind_;
InstanceCallInstr* instance_call_;
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698