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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 12091100: Use SAR for positive divident by a power-of two constant divisor. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 3881 matching lines...) Expand 10 before | Expand all | Expand 10 after
3892 void set_overflow(bool overflow) { 3892 void set_overflow(bool overflow) {
3893 overflow_ = overflow; 3893 overflow_ = overflow;
3894 } 3894 }
3895 3895
3896 void PrintTo(BufferFormatter* f) const; 3896 void PrintTo(BufferFormatter* f) const;
3897 3897
3898 virtual void InferRange(); 3898 virtual void InferRange();
3899 3899
3900 virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer); 3900 virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
3901 3901
3902 // Returns true if right is a non-zero Smi constant which absolute value is
3903 // a power of two.
3904 bool RightIsPowerOfTwoConstant() const;
3905
3902 private: 3906 private:
3903 const Token::Kind op_kind_; 3907 const Token::Kind op_kind_;
3904 InstanceCallInstr* instance_call_; 3908 InstanceCallInstr* instance_call_;
3905 bool overflow_; 3909 bool overflow_;
3906 3910
3907 DISALLOW_COPY_AND_ASSIGN(BinarySmiOpInstr); 3911 DISALLOW_COPY_AND_ASSIGN(BinarySmiOpInstr);
3908 }; 3912 };
3909 3913
3910 3914
3911 // Handles both Smi operations: BIT_OR and NEGATE. 3915 // Handles both Smi operations: BIT_OR and NEGATE.
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
4494 ForwardInstructionIterator* current_iterator_; 4498 ForwardInstructionIterator* current_iterator_;
4495 4499
4496 private: 4500 private:
4497 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4501 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4498 }; 4502 };
4499 4503
4500 4504
4501 } // namespace dart 4505 } // namespace dart
4502 4506
4503 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4507 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698