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

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

Issue 13884009: Support IfThenElse instruction pattern for arbitrary smi constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
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 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 virtual void PrintOperandsTo(BufferFormatter* f) const; 2767 virtual void PrintOperandsTo(BufferFormatter* f) const;
2768 2768
2769 virtual CompileType ComputeType() const; 2769 virtual CompileType ComputeType() const;
2770 2770
2771 virtual void InferRange(); 2771 virtual void InferRange();
2772 2772
2773 virtual bool CanDeoptimize() const { return false; } 2773 virtual bool CanDeoptimize() const { return false; }
2774 virtual bool HasSideEffect() const { return false; } 2774 virtual bool HasSideEffect() const { return false; }
2775 2775
2776 virtual bool AttributesEqual(Instruction* other) const { 2776 virtual bool AttributesEqual(Instruction* other) const {
2777 return kind_ == other->AsIfThenElse()->kind_; 2777 IfThenElseInstr* other_if_then_else = other->AsIfThenElse();
2778 return (kind_ == other_if_then_else->kind_) &&
2779 (if_true_ == other_if_then_else->if_true_) &&
2780 (if_false_ == other_if_then_else->if_false_);
2778 } 2781 }
2779 2782
2780 virtual bool AffectedBySideEffect() const { 2783 virtual bool AffectedBySideEffect() const {
2781 return false; 2784 return false;
2782 } 2785 }
2783 2786
2784 Value* left() const { return inputs_[0]; } 2787 Value* left() const { return inputs_[0]; }
2785 Value* right() const { return inputs_[1]; } 2788 Value* right() const { return inputs_[1]; }
2786 intptr_t if_true() const { return if_true_; } 2789 intptr_t if_true() const { return if_true_; }
2787 intptr_t if_false() const { return if_false_; } 2790 intptr_t if_false() const { return if_false_; }
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 ForwardInstructionIterator* current_iterator_; 4882 ForwardInstructionIterator* current_iterator_;
4880 4883
4881 private: 4884 private:
4882 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4885 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4883 }; 4886 };
4884 4887
4885 4888
4886 } // namespace dart 4889 } // namespace dart
4887 4890
4888 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4891 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | tests/language/if_conversion_vm_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698