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

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

Issue 10914066: Remove old implementation of binary double operations. (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 | « runtime/vm/il_printer.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) 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 M(StoreVMField, StoreVMFieldComp) \ 83 M(StoreVMField, StoreVMFieldComp) \
84 M(InstantiateTypeArguments, InstantiateTypeArgumentsComp) \ 84 M(InstantiateTypeArguments, InstantiateTypeArgumentsComp) \
85 M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \ 85 M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \
86 M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \ 86 M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \
87 M(AllocateContext, AllocateContextComp) \ 87 M(AllocateContext, AllocateContextComp) \
88 M(ChainContext, ChainContextComp) \ 88 M(ChainContext, ChainContextComp) \
89 M(CloneContext, CloneContextComp) \ 89 M(CloneContext, CloneContextComp) \
90 M(CatchEntry, CatchEntryComp) \ 90 M(CatchEntry, CatchEntryComp) \
91 M(BinarySmiOp, BinarySmiOpComp) \ 91 M(BinarySmiOp, BinarySmiOpComp) \
92 M(BinaryMintOp, BinaryMintOpComp) \ 92 M(BinaryMintOp, BinaryMintOpComp) \
93 M(BinaryDoubleOp, BinaryDoubleOpComp) \
94 M(UnarySmiOp, UnarySmiOpComp) \ 93 M(UnarySmiOp, UnarySmiOpComp) \
95 M(NumberNegate, NumberNegateComp) \ 94 M(NumberNegate, NumberNegateComp) \
96 M(CheckStackOverflow, CheckStackOverflowComp) \ 95 M(CheckStackOverflow, CheckStackOverflowComp) \
97 M(DoubleToDouble, DoubleToDoubleComp) \ 96 M(DoubleToDouble, DoubleToDoubleComp) \
98 M(SmiToDouble, SmiToDoubleComp) \ 97 M(SmiToDouble, SmiToDoubleComp) \
99 M(CheckClass, CheckClassComp) \ 98 M(CheckClass, CheckClassComp) \
100 M(CheckSmi, CheckSmiComp) \ 99 M(CheckSmi, CheckSmiComp) \
101 M(Constant, ConstantComp) \ 100 M(Constant, ConstantComp) \
102 M(CheckEitherNonSmi, CheckEitherNonSmiComp) \ 101 M(CheckEitherNonSmi, CheckEitherNonSmiComp) \
103 M(UnboxedDoubleBinaryOp, UnboxedDoubleBinaryOpComp) \ 102 M(UnboxedDoubleBinaryOp, UnboxedDoubleBinaryOpComp) \
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 virtual intptr_t ResultCid() const; 1876 virtual intptr_t ResultCid() const;
1878 1877
1879 private: 1878 private:
1880 const Token::Kind op_kind_; 1879 const Token::Kind op_kind_;
1881 InstanceCallComp* instance_call_; 1880 InstanceCallComp* instance_call_;
1882 1881
1883 DISALLOW_COPY_AND_ASSIGN(BinaryMintOpComp); 1882 DISALLOW_COPY_AND_ASSIGN(BinaryMintOpComp);
1884 }; 1883 };
1885 1884
1886 1885
1887 class BinaryDoubleOpComp : public TemplateComputation<0> {
1888 public:
1889 BinaryDoubleOpComp(Token::Kind op_kind, InstanceCallComp* instance_call)
1890 : op_kind_(op_kind), instance_call_(instance_call) { }
1891
1892 Token::Kind op_kind() const { return op_kind_; }
1893
1894 InstanceCallComp* instance_call() const { return instance_call_; }
1895
1896 const ICData* ic_data() const { return instance_call()->ic_data(); }
1897
1898 virtual void PrintOperandsTo(BufferFormatter* f) const;
1899
1900 DECLARE_CALL_COMPUTATION(BinaryDoubleOp)
1901
1902 virtual intptr_t ArgumentCount() const { return 2; }
1903
1904 virtual bool CanDeoptimize() const { return true; }
1905 virtual intptr_t ResultCid() const;
1906
1907 private:
1908 const Token::Kind op_kind_;
1909 InstanceCallComp* instance_call_;
1910
1911 DISALLOW_COPY_AND_ASSIGN(BinaryDoubleOpComp);
1912 };
1913
1914
1915 // Handles both Smi operations: BIT_OR and NEGATE. 1886 // Handles both Smi operations: BIT_OR and NEGATE.
1916 class UnarySmiOpComp : public TemplateComputation<1> { 1887 class UnarySmiOpComp : public TemplateComputation<1> {
1917 public: 1888 public:
1918 UnarySmiOpComp(Token::Kind op_kind, 1889 UnarySmiOpComp(Token::Kind op_kind,
1919 InstanceCallComp* instance_call, 1890 InstanceCallComp* instance_call,
1920 Value* value) 1891 Value* value)
1921 : op_kind_(op_kind), instance_call_(instance_call) { 1892 : op_kind_(op_kind), instance_call_(instance_call) {
1922 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT)); 1893 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT));
1923 ASSERT(value != NULL); 1894 ASSERT(value != NULL);
1924 inputs_[0] = value; 1895 inputs_[0] = value;
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3360 ForwardInstructionIterator* current_iterator_; 3331 ForwardInstructionIterator* current_iterator_;
3361 3332
3362 private: 3333 private:
3363 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3334 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3364 }; 3335 };
3365 3336
3366 3337
3367 } // namespace dart 3338 } // namespace dart
3368 3339
3369 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3340 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698