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

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

Issue 10908057: Eliminate environment uses at smi-comparisons. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | runtime/vm/intermediate_language_ia32.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 1965
1966 intptr_t token_pos() const { return token_pos_; } 1966 intptr_t token_pos() const { return token_pos_; }
1967 1967
1968 // Receiver class id is computed from collected ICData. 1968 // Receiver class id is computed from collected ICData.
1969 void set_receiver_class_id(intptr_t value) { receiver_class_id_ = value; } 1969 void set_receiver_class_id(intptr_t value) { receiver_class_id_ = value; }
1970 intptr_t receiver_class_id() const { return receiver_class_id_; } 1970 intptr_t receiver_class_id() const { return receiver_class_id_; }
1971 1971
1972 virtual void PrintOperandsTo(BufferFormatter* f) const; 1972 virtual void PrintOperandsTo(BufferFormatter* f) const;
1973 1973
1974 virtual bool CanDeoptimize() const { 1974 virtual bool CanDeoptimize() const {
1975 return (receiver_class_id() != kDoubleCid); 1975 return (receiver_class_id() != kDoubleCid)
1976 && (receiver_class_id() != kSmiCid);
1976 } 1977 }
1977 1978
1978 virtual intptr_t ResultCid() const; 1979 virtual intptr_t ResultCid() const;
1979 1980
1980 virtual void EmitBranchCode(FlowGraphCompiler* compiler, 1981 virtual void EmitBranchCode(FlowGraphCompiler* compiler,
1981 BranchInstr* branch); 1982 BranchInstr* branch);
1982 1983
1983 virtual intptr_t DeoptimizationTarget() const { 1984 virtual intptr_t DeoptimizationTarget() const {
1984 return GetDeoptId(); 1985 return GetDeoptId();
1985 } 1986 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 // between boxed and unboxed doubles and integers. 2025 // between boxed and unboxed doubles and integers.
2025 void set_operands_class_id(intptr_t value) { 2026 void set_operands_class_id(intptr_t value) {
2026 operands_class_id_ = value; 2027 operands_class_id_ = value;
2027 } 2028 }
2028 2029
2029 intptr_t operands_class_id() const { return operands_class_id_; } 2030 intptr_t operands_class_id() const { return operands_class_id_; }
2030 2031
2031 virtual void PrintOperandsTo(BufferFormatter* f) const; 2032 virtual void PrintOperandsTo(BufferFormatter* f) const;
2032 2033
2033 virtual bool CanDeoptimize() const { 2034 virtual bool CanDeoptimize() const {
2034 return operands_class_id() != kDoubleCid; 2035 return (operands_class_id() != kDoubleCid)
2036 && (operands_class_id() != kSmiCid);
2035 } 2037 }
2036 2038
2037 virtual intptr_t ResultCid() const; 2039 virtual intptr_t ResultCid() const;
2038 2040
2039 virtual void EmitBranchCode(FlowGraphCompiler* compiler, 2041 virtual void EmitBranchCode(FlowGraphCompiler* compiler,
2040 BranchInstr* branch); 2042 BranchInstr* branch);
2041 2043
2042 2044
2043 virtual intptr_t DeoptimizationTarget() const { 2045 virtual intptr_t DeoptimizationTarget() const {
2044 return GetDeoptId(); 2046 return GetDeoptId();
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3411 ForwardInstructionIterator* current_iterator_; 3413 ForwardInstructionIterator* current_iterator_;
3412 3414
3413 private: 3415 private:
3414 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3416 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3415 }; 3417 };
3416 3418
3417 3419
3418 } // namespace dart 3420 } // namespace dart
3419 3421
3420 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3422 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698