| OLD | NEW | 
|     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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   132   V(_Float64x2, get:y, Float64x2GetY, 1942257886)                              \ |   132   V(_Float64x2, get:y, Float64x2GetY, 1942257886)                              \ | 
|   133   V(_Float64x2, _negate, Float64x2Negate, 2133212774)                          \ |   133   V(_Float64x2, _negate, Float64x2Negate, 2133212774)                          \ | 
|   134   V(_Float64x2, abs, Float64x2Abs, 1224776282)                                 \ |   134   V(_Float64x2, abs, Float64x2Abs, 1224776282)                                 \ | 
|   135   V(_Float64x2, sqrt, Float64x2Sqrt, 1037569520)                               \ |   135   V(_Float64x2, sqrt, Float64x2Sqrt, 1037569520)                               \ | 
|   136   V(_Float64x2, get:signMask, Float64x2GetSignMask, 252936800)                 \ |   136   V(_Float64x2, get:signMask, Float64x2GetSignMask, 252936800)                 \ | 
|   137   V(_Float64x2, scale, Float64x2Scale, 1199438744)                             \ |   137   V(_Float64x2, scale, Float64x2Scale, 1199438744)                             \ | 
|   138   V(_Float64x2, withX, Float64x2WithX, 1042725932)                             \ |   138   V(_Float64x2, withX, Float64x2WithX, 1042725932)                             \ | 
|   139   V(_Float64x2, withY, Float64x2WithY, 1496958947)                             \ |   139   V(_Float64x2, withY, Float64x2WithY, 1496958947)                             \ | 
|   140   V(_Float64x2, min, Float64x2Min, 485240583)                                  \ |   140   V(_Float64x2, min, Float64x2Min, 485240583)                                  \ | 
|   141   V(_Float64x2, max, Float64x2Max, 2146148204)                                 \ |   141   V(_Float64x2, max, Float64x2Max, 2146148204)                                 \ | 
 |   142   V(Int32x4, Int32x4., Int32x4Constructor, 665986284)                          \ | 
|   142   V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 87082660)                   \ |   143   V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 87082660)                   \ | 
|   143   V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits,              \ |   144   V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits,              \ | 
|   144       372517418)                                                               \ |   145       372517418)                                                               \ | 
|   145   V(_Int32x4, get:flagX, Int32x4GetFlagX, 1077555238)                          \ |   146   V(_Int32x4, get:flagX, Int32x4GetFlagX, 1077555238)                          \ | 
|   146   V(_Int32x4, get:flagY, Int32x4GetFlagY, 779160284)                           \ |   147   V(_Int32x4, get:flagY, Int32x4GetFlagY, 779160284)                           \ | 
|   147   V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181912283)                           \ |   148   V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181912283)                           \ | 
|   148   V(_Int32x4, get:flagW, Int32x4GetFlagW, 977675534)                           \ |   149   V(_Int32x4, get:flagW, Int32x4GetFlagW, 977675534)                           \ | 
|   149   V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929271914)                    \ |   150   V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929271914)                    \ | 
|   150   V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702)                             \ |   151   V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702)                             \ | 
|   151   V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870)                        \ |   152   V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870)                        \ | 
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   767   M(Float32x4Splat)                                                            \ |   768   M(Float32x4Splat)                                                            \ | 
|   768   M(Float32x4Comparison)                                                       \ |   769   M(Float32x4Comparison)                                                       \ | 
|   769   M(Float32x4MinMax)                                                           \ |   770   M(Float32x4MinMax)                                                           \ | 
|   770   M(Float32x4Scale)                                                            \ |   771   M(Float32x4Scale)                                                            \ | 
|   771   M(Float32x4Sqrt)                                                             \ |   772   M(Float32x4Sqrt)                                                             \ | 
|   772   M(Float32x4ZeroArg)                                                          \ |   773   M(Float32x4ZeroArg)                                                          \ | 
|   773   M(Float32x4Clamp)                                                            \ |   774   M(Float32x4Clamp)                                                            \ | 
|   774   M(Float32x4With)                                                             \ |   775   M(Float32x4With)                                                             \ | 
|   775   M(Float32x4ToInt32x4)                                                        \ |   776   M(Float32x4ToInt32x4)                                                        \ | 
|   776   M(MaterializeObject)                                                         \ |   777   M(MaterializeObject)                                                         \ | 
 |   778   M(Int32x4Constructor)                                                        \ | 
|   777   M(Int32x4BoolConstructor)                                                    \ |   779   M(Int32x4BoolConstructor)                                                    \ | 
|   778   M(Int32x4GetFlag)                                                            \ |   780   M(Int32x4GetFlag)                                                            \ | 
|   779   M(Int32x4Select)                                                             \ |   781   M(Int32x4Select)                                                             \ | 
|   780   M(Int32x4SetFlag)                                                            \ |   782   M(Int32x4SetFlag)                                                            \ | 
|   781   M(Int32x4ToFloat32x4)                                                        \ |   783   M(Int32x4ToFloat32x4)                                                        \ | 
|   782   M(BinaryInt32x4Op)                                                           \ |   784   M(BinaryInt32x4Op)                                                           \ | 
|   783   M(TestSmi)                                                                   \ |   785   M(TestSmi)                                                                   \ | 
|   784   M(TestCids)                                                                  \ |   786   M(TestCids)                                                                  \ | 
|   785   M(BoxFloat64x2)                                                              \ |   787   M(BoxFloat64x2)                                                              \ | 
|   786   M(UnboxFloat64x2)                                                            \ |   788   M(UnboxFloat64x2)                                                            \ | 
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1093   friend class Float32x4WithInstr; |  1095   friend class Float32x4WithInstr; | 
|  1094   friend class Float32x4ToInt32x4Instr; |  1096   friend class Float32x4ToInt32x4Instr; | 
|  1095   friend class Simd64x2ShuffleInstr; |  1097   friend class Simd64x2ShuffleInstr; | 
|  1096   friend class Float64x2ZeroArgInstr; |  1098   friend class Float64x2ZeroArgInstr; | 
|  1097   friend class Float64x2OneArgInstr; |  1099   friend class Float64x2OneArgInstr; | 
|  1098   friend class Float32x4ToFloat64x2Instr; |  1100   friend class Float32x4ToFloat64x2Instr; | 
|  1099   friend class Float64x2ToFloat32x4Instr; |  1101   friend class Float64x2ToFloat32x4Instr; | 
|  1100   friend class Float64x2ZeroInstr; |  1102   friend class Float64x2ZeroInstr; | 
|  1101   friend class Float64x2SplatInstr; |  1103   friend class Float64x2SplatInstr; | 
|  1102   friend class Float64x2ConstructorInstr; |  1104   friend class Float64x2ConstructorInstr; | 
 |  1105   friend class Int32x4ConstructorInstr; | 
|  1103   friend class Int32x4BoolConstructorInstr; |  1106   friend class Int32x4BoolConstructorInstr; | 
|  1104   friend class Int32x4GetFlagInstr; |  1107   friend class Int32x4GetFlagInstr; | 
|  1105   friend class Int32x4SetFlagInstr; |  1108   friend class Int32x4SetFlagInstr; | 
|  1106   friend class Int32x4SelectInstr; |  1109   friend class Int32x4SelectInstr; | 
|  1107   friend class Int32x4ToFloat32x4Instr; |  1110   friend class Int32x4ToFloat32x4Instr; | 
|  1108   friend class BinaryInt32x4OpInstr; |  1111   friend class BinaryInt32x4OpInstr; | 
|  1109   friend class BinaryFloat64x2OpInstr; |  1112   friend class BinaryFloat64x2OpInstr; | 
|  1110   friend class BinaryMintOpInstr; |  1113   friend class BinaryMintOpInstr; | 
|  1111   friend class BinarySmiOpInstr; |  1114   friend class BinarySmiOpInstr; | 
|  1112   friend class UnarySmiOpInstr; |  1115   friend class UnarySmiOpInstr; | 
| (...skipping 5269 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6382  |  6385  | 
|  6383   virtual bool MayThrow() const { return false; } |  6386   virtual bool MayThrow() const { return false; } | 
|  6384  |  6387  | 
|  6385  private: |  6388  private: | 
|  6386   const MethodRecognizer::Kind op_kind_; |  6389   const MethodRecognizer::Kind op_kind_; | 
|  6387  |  6390  | 
|  6388   DISALLOW_COPY_AND_ASSIGN(Float64x2OneArgInstr); |  6391   DISALLOW_COPY_AND_ASSIGN(Float64x2OneArgInstr); | 
|  6389 }; |  6392 }; | 
|  6390  |  6393  | 
|  6391  |  6394  | 
 |  6395 class Int32x4ConstructorInstr : public TemplateDefinition<4> { | 
 |  6396  public: | 
 |  6397   Int32x4ConstructorInstr(Value* value0, Value* value1, Value* value2, | 
 |  6398                           Value* value3, intptr_t deopt_id) { | 
 |  6399     SetInputAt(0, value0); | 
 |  6400     SetInputAt(1, value1); | 
 |  6401     SetInputAt(2, value2); | 
 |  6402     SetInputAt(3, value3); | 
 |  6403     deopt_id_ = deopt_id; | 
 |  6404   } | 
 |  6405  | 
 |  6406   Value* value0() const { return inputs_[0]; } | 
 |  6407   Value* value1() const { return inputs_[1]; } | 
 |  6408   Value* value2() const { return inputs_[2]; } | 
 |  6409   Value* value3() const { return inputs_[3]; } | 
 |  6410  | 
 |  6411   virtual void PrintOperandsTo(BufferFormatter* f) const; | 
 |  6412  | 
 |  6413   virtual bool CanDeoptimize() const { return false; } | 
 |  6414  | 
 |  6415   virtual Representation representation() const { | 
 |  6416     return kUnboxedInt32x4; | 
 |  6417   } | 
 |  6418  | 
 |  6419   virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 
 |  6420     ASSERT((idx >= 0) && (idx < 4)); | 
 |  6421     return kUnboxedUint32; | 
 |  6422   } | 
 |  6423  | 
 |  6424   virtual intptr_t DeoptimizationTarget() const { | 
 |  6425     // Direct access since this instruction cannot deoptimize, and the deopt-id | 
 |  6426     // was inherited from another instruction that could deoptimize. | 
 |  6427     return deopt_id_; | 
 |  6428   } | 
 |  6429  | 
 |  6430   DECLARE_INSTRUCTION(Int32x4Constructor) | 
 |  6431   virtual CompileType ComputeType() const; | 
 |  6432  | 
 |  6433   virtual bool AllowsCSE() const { return true; } | 
 |  6434   virtual EffectSet Effects() const { return EffectSet::None(); } | 
 |  6435   virtual EffectSet Dependencies() const { return EffectSet::None(); } | 
 |  6436   virtual bool AttributesEqual(Instruction* other) const { return true; } | 
 |  6437  | 
 |  6438   virtual bool MayThrow() const { return false; } | 
 |  6439  | 
 |  6440  private: | 
 |  6441   DISALLOW_COPY_AND_ASSIGN(Int32x4ConstructorInstr); | 
 |  6442 }; | 
 |  6443  | 
 |  6444  | 
|  6392 class Int32x4BoolConstructorInstr : public TemplateDefinition<4> { |  6445 class Int32x4BoolConstructorInstr : public TemplateDefinition<4> { | 
|  6393  public: |  6446  public: | 
|  6394   Int32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2, |  6447   Int32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2, | 
|  6395                                Value* value3, intptr_t deopt_id) { |  6448                               Value* value3, intptr_t deopt_id) { | 
|  6396     SetInputAt(0, value0); |  6449     SetInputAt(0, value0); | 
|  6397     SetInputAt(1, value1); |  6450     SetInputAt(1, value1); | 
|  6398     SetInputAt(2, value2); |  6451     SetInputAt(2, value2); | 
|  6399     SetInputAt(3, value3); |  6452     SetInputAt(3, value3); | 
|  6400     deopt_id_ = deopt_id; |  6453     deopt_id_ = deopt_id; | 
|  6401   } |  6454   } | 
|  6402  |  6455  | 
|  6403   Value* value0() const { return inputs_[0]; } |  6456   Value* value0() const { return inputs_[0]; } | 
|  6404   Value* value1() const { return inputs_[1]; } |  6457   Value* value1() const { return inputs_[1]; } | 
|  6405   Value* value2() const { return inputs_[2]; } |  6458   Value* value2() const { return inputs_[2]; } | 
|  6406   Value* value3() const { return inputs_[3]; } |  6459   Value* value3() const { return inputs_[3]; } | 
|  6407  |  6460  | 
|  6408   virtual void PrintOperandsTo(BufferFormatter* f) const; |  6461   virtual void PrintOperandsTo(BufferFormatter* f) const; | 
|  6409  |  6462  | 
|  6410   virtual bool CanDeoptimize() const { return false; } |  6463   virtual bool CanDeoptimize() const { return false; } | 
|  6411  |  6464  | 
|  6412   virtual Representation representation() const { |  6465   virtual Representation representation() const { | 
|  6413     return kUnboxedInt32x4; |  6466     return kUnboxedInt32x4; | 
|  6414   } |  6467   } | 
|  6415  |  6468  | 
|  6416   virtual Representation RequiredInputRepresentation(intptr_t idx) const { |  6469   virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 
|  6417     ASSERT(idx >= 0 && idx < 4); |  6470     ASSERT((idx >= 0) && (idx < 4)); | 
|  6418     return kTagged; |  6471     return kTagged; | 
|  6419   } |  6472   } | 
|  6420  |  6473  | 
|  6421   virtual intptr_t DeoptimizationTarget() const { |  6474   virtual intptr_t DeoptimizationTarget() const { | 
|  6422     // Direct access since this instruction cannot deoptimize, and the deopt-id |  6475     // Direct access since this instruction cannot deoptimize, and the deopt-id | 
|  6423     // was inherited from another instruction that could deoptimize. |  6476     // was inherited from another instruction that could deoptimize. | 
|  6424     return deopt_id_; |  6477     return deopt_id_; | 
|  6425   } |  6478   } | 
|  6426  |  6479  | 
|  6427   DECLARE_INSTRUCTION(Int32x4BoolConstructor) |  6480   DECLARE_INSTRUCTION(Int32x4BoolConstructor) | 
| (...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  8314   ForwardInstructionIterator* current_iterator_; |  8367   ForwardInstructionIterator* current_iterator_; | 
|  8315  |  8368  | 
|  8316  private: |  8369  private: | 
|  8317   DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |  8370   DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 
|  8318 }; |  8371 }; | 
|  8319  |  8372  | 
|  8320  |  8373  | 
|  8321 }  // namespace dart |  8374 }  // namespace dart | 
|  8322  |  8375  | 
|  8323 #endif  // VM_INTERMEDIATE_LANGUAGE_H_ |  8376 #endif  // VM_INTERMEDIATE_LANGUAGE_H_ | 
| OLD | NEW |