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

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

Issue 396733006: Optimize the multiplication of two 32-bit unsigned integers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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_arm.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 7068 matching lines...) Expand 10 before | Expand all | Expand 10 after
7079 Token::Kind op_kind() const { return op_kind_; } 7079 Token::Kind op_kind() const { return op_kind_; }
7080 7080
7081 bool can_overflow() const { return can_overflow_; } 7081 bool can_overflow() const { return can_overflow_; }
7082 void set_can_overflow(bool value) { can_overflow_ = value; } 7082 void set_can_overflow(bool value) { can_overflow_ = value; }
7083 7083
7084 virtual void PrintOperandsTo(BufferFormatter* f) const; 7084 virtual void PrintOperandsTo(BufferFormatter* f) const;
7085 7085
7086 virtual bool CanDeoptimize() const { 7086 virtual bool CanDeoptimize() const {
7087 return FLAG_throw_on_javascript_int_overflow 7087 return FLAG_throw_on_javascript_int_overflow
7088 || (can_overflow() && ((op_kind() == Token::kADD) || 7088 || (can_overflow() && ((op_kind() == Token::kADD) ||
7089 (op_kind() == Token::kSUB))); 7089 (op_kind() == Token::kSUB)))
7090 || (op_kind() == Token::kMUL); // Deopt if inputs are not int32.
7090 } 7091 }
7091 7092
7092 virtual Representation representation() const { 7093 virtual Representation representation() const {
7093 return kUnboxedMint; 7094 return kUnboxedMint;
7094 } 7095 }
7095 7096
7096 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 7097 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
7097 ASSERT((idx == 0) || (idx == 1)); 7098 ASSERT((idx == 0) || (idx == 1));
7098 return kUnboxedMint; 7099 return kUnboxedMint;
7099 } 7100 }
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
8568 ForwardInstructionIterator* current_iterator_; 8569 ForwardInstructionIterator* current_iterator_;
8569 8570
8570 private: 8571 private:
8571 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 8572 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
8572 }; 8573 };
8573 8574
8574 8575
8575 } // namespace dart 8576 } // namespace dart
8576 8577
8577 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8578 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698